Szerző Téma: Set timer probléma  (Megtekintve 748 alkalommal)

Set timer probléma
« Dátum: 2013. Január 30. - 13:06:37 »
0 Show voters
Hali!
Kellene egy oylan parancs,amit ha beírjuk (/asd1) akkor settimer(playerid, 10000<-10mp); és ez lejár,akkor megöli a playert :D

Set timer probléma
« Válasz #1 Dátum: 2013. Január 30. - 14:10:11 »
0 Show voters
Lehet h van egyszerûbb módja is, de gyorsan összedobtam egyet:
 
#include <a_samp>
#include <zcmd>
forward halal(playerid);
CMD:asd1(playerid, params[])
{
SendClientMessage(playerid, -1, \"10MP és meghalsz =(\");
SetTimer(\"halal\", 10000, false);
return 1;
}
public halal(playerid)
{
SetPlayerHealth(playerid, 0);
}

 
Ha nem ZCMD-s kell írj

Set timer probléma
« Válasz #2 Dátum: 2013. Január 30. - 14:44:56 »
0 Show voters
Idézetet írta: sticky2 date=1359551411\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"33185\" data-ipsquote-contentclass=\"forums_Topic
Lehet h van egyszerûbb módja is, de gyorsan összedobtam egyet:
 
#include <a_samp>
#include <zcmd>
forward halal(playerid);
CMD:asd1(playerid, params[])
{
SendClientMessage(playerid, -1, \"10MP és meghalsz =(\");
SetTimer(\"halal\", 10000, false);
return 1;
}
public halal(playerid)
{
SetPlayerHealth(playerid, 0);
}

 
Ha nem ZCMD-s kell írj
 
kár, hogy nemjó...


#include <a_samp>
#include <zcmd>
CMD:asd1(playerid, params[]) return SetTimerEx(\"YouWillDie\", 10000, false, \"d\", playerid);
forward YouWillDie(playerid);
public YouWillDie(playerid) return SetPlayerHealth(playerid, 0);

Set timer probléma
« Válasz #3 Dátum: 2013. Február 01. - 07:22:38 »
0 Show voters
A sajatom kiprobaltam mukodik...

Set timer probléma
« Válasz #4 Dátum: 2013. Február 01. - 13:26:25 »
0 Show voters
Idézetet írta: sticky2 date=1359699758\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"33185\" data-ipsquote-contentclass=\"forums_Topic
A sajatom kiprobaltam mukodik...
 
Az egy dolog, de csak sima \"SetTimer\" -t alkalmaztál a konkrétan a játékosra vonatkozó \"SetTimerEx\" helyett.  :rolleyes:

Set timer probléma
« Válasz #5 Dátum: 2013. Február 01. - 14:55:31 »
0 Show voters
Igaza van mert igy csak a 0 id jû játékos fog meghalni:/

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal