1 command available
#5

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
Roomeo can you read? that's not his question.

Anyway you can use something like this:
pawn Код:
new IsInDM[MAX_PLAYERS] = 0; //Creating variable...
if (strcmp("/deathmatch", cmdtext, true, 10) == 0)
{
    IsInDM[playerid] = 1;//Sets the variable to 1 so he cannot leave
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
    if(IsInDM[playerid] == 1) return SendClientMessage(playerid, COLOR, "Uhm..you're in deathmatch");
    SetPlayerHealth(playerid, 100);//Sets the players health to 100 if he is NOT in a DM zone
}
hmm i thougth there was a easier way because then i have to set that IF in all my commands :S, and that would make my script to long, i have to hold it to minimum lines to make it work faster
Reply


Messages In This Thread
1 command available - by Madsen - 09.03.2011, 11:51
Re: 1 command available - by Roomeo - 09.03.2011, 12:02
Re: 1 command available - by Skylar Paul - 09.03.2011, 12:16
Re: 1 command available - by alpha500delta - 09.03.2011, 12:25
Re: 1 command available - by Madsen - 09.03.2011, 13:44
Re: 1 command available - by Madsen - 09.03.2011, 20:22
Re: 1 command available - by Marricio - 09.03.2011, 21:15
Re: 1 command available - by Madsen - 10.03.2011, 13:21
Re: 1 command available - by Madsen - 11.03.2011, 13:55

Forum Jump:


Users browsing this thread: 8 Guest(s)