Abaut saving
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
I'll assume 0=male and 1=female but it could be the opposite.

pawn Код:
if(!strcmp(cmdtext, "/command", true)) // Or whatever command system you use
{
    if(PlayerInfo[playerid][Sex] == 1) return SendClientMessage(playerid, red, "Only males can use this command.");
    // code to do if they are male
}
ZCMD would be more reasonable.

pawn Код:
CMD:getsex(playerid, params[])
{
       if(PlayerInfo[playerid][Sex] != 0) return SendClientMessage(playerid, -1, "Only males can use this command!");
       return 1;
}
To change sex:
pawn Код:
CMD:sexchange(playerid, params[])
{
       if(PlayerInfo[playerid][Sex] != 1) return PlayerInfo[playerid][Sex] = 1;
       else if(PlayerInfo[playerid][Sex] != 0) return PlayerInfo[playerid][Sex] = 0;
       SendClientMessage(playerid, -1, "Sex changed!");
       return 1;
}
Enjoy.
Reply


Messages In This Thread
Abaut saving - by elefante - 21.11.2011, 14:06
Re: Abaut saving - by MP2 - 22.11.2011, 01:49
Re: Abaut saving - by Camacorn - 22.11.2011, 02:17
Re: Abaut saving - by MP2 - 22.11.2011, 07:07

Forum Jump:


Users browsing this thread: 1 Guest(s)