10.03.2013, 11:08
@Adyzta i know that. but what's the difference about Normal on and bool one?
@Rajat_Pawar Looking at it now.
EDIT
just one question as i see on your tutorial. the godmode.
Mine
Yours
I can only see the difference is on bool uses true and normal one uses 1
@Rajat_Pawar Looking at it now.
EDIT
just one question as i see on your tutorial. the godmode.
Mine
pawn Код:
new IsOnGodMode[MAX_PLAYERS];
CMD:godmode(playerid, params[])
{
if(IsOnGodMode[playerid] == 1) //Checking if the 'state' of the player is GOD MODE.
return SendClientMessage(playerid, -1,"You are already on god mode");
if(IsOnGodMode[playerid] == 0) //Checking if the 'state' of the player is NOT GOD MODE.
return SendClientMessage(playerid, -1,"You're god mode is already off!");
return 1;
}
pawn Код:
new bool:isplayerongodmode = false;
CMD:god(playerid)
{
if(isplayerongodmode == false) //Checking if the 'state' of the player is NOT GOD MODE.
{
SetPlayerHealth(playerid, 999); //Setting the player's health to infinity.
isplayerongodmode = true; //Setting the player's mode to 'ON GOD MODE'.
}
if(isplayerongodmode == true) //Checking if the 'state' of the player is GOD MODE.
{
SendClientMessage(... "You are already on god mode!"); //Sending him the error message.
}
return 1;
}

