05.04.2015, 00:46
Hey guy i have made the drop system here the code i'll not show all i'll show you the nessssary of bug
The line that i said is the problem cuz it not kill the timerdrop[playerid] timer but it killed my previous/early timer
i mean at the onplayerconnect i just create the timer to update the player textdraw /bar
Barupdatetimer[playerid] = SetTimerEx("Barupdate", 100, true, "i", playerid); << onplayerconnect
and it work fine cuz i just coding it if the player proceed this timer it will be send the client message but when i use /drop command it kill the barupdatetimer[playerid] i very get confused can someone help me?
PHP код:
CMD:drop(playerid, params[])
{
new animlib[32];
new animname[32];
//new msg[128];
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
if(GetPlayerAnimationIndex(playerid))
{
if(!strcmp(animname, "IDLE_STANCE", true) || !strcmp(animname, "FatIdle", true) || !strcmp(animname, "leanIDLE", true) || !strcmp(animname, "MuscleIdle", true) || !strcmp(animname, "Idlestance_fat", true) || !strcmp(animname, "idlestance_old", true) || !strcmp(animname, "Idle_Gang1", true) || !strcmp(animname, "woman_idlestance", true) || !strcmp(animname, "POOL_Idle_Stance", true) || !strcmp(animname, "POOL_Idle_Stance", true))
{
ApplyAnimation(playerid, "BOMBER", "BOM_PLANT_IN", 4.0, 0, 0, 0, 0, 0);
KillTimer(timerdrop[playerid]); <<< this line is the problem
timerdrop[playerid] = SetTimerEx("Droptime", 400, false, "i", playerid);
}
}
return 1;
}
i mean at the onplayerconnect i just create the timer to update the player textdraw /bar
Barupdatetimer[playerid] = SetTimerEx("Barupdate", 100, true, "i", playerid); << onplayerconnect
and it work fine cuz i just coding it if the player proceed this timer it will be send the client message but when i use /drop command it kill the barupdatetimer[playerid] i very get confused can someone help me?