bug fly mode
#1

Hey ! can you fix me this problem with flymode? i can activate it but i cant deactivate it



CMD:flymode(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new sendername[30],string[256];
if(flymode[playerid] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
flymode[playerid] = 1;
format(string,sizeof(string),"%s a activat comanda /flymode.", sendername);
InitFly(playerid);
StartFly(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
}
else
{
GetPlayerName(playerid, sendername, sizeof(sendername));
flymode[playerid] = 0;
format(string,sizeof(string),"%s a dezactivat comanda /flymode.", sendername);
StopFly(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
}
ABroadCast(COLOR_YELLOW,string,1);
}
else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
}
return 1;
}


please help if you know how to fix
Reply
#2

Use.. The.. Tag.. [PHP]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)