How to assign a value
#1

ok when i type /jail i get jail, i understand that any player with the id 0 will get jailed if they type it they get jaild so how can i assign a value to it

Код:
COMMAND:jail(playerid,params[])
{   new pskin = GetPlayerSkin(playerid);
    if(pskin == 265 || pskin == 266 || pskin == 267 || pskin == 280 || pskin == 281 || pskin == 284 || pskin == 285 || pskin == 286 || pskin == 287 || pskin == 288)

    if(IsPlayerConnected(playerid))
    {
        new pId;

         if(!IsPlayerConnected(pId)) return SendClientMessage(playerid, 0xFF0000AA, "The ID You Entered Was Not Found.");
                else
                {
                    new rand = random(sizeof(JailCellSpawns));
                    SetPlayerPos(pId, JailCellSpawns[rand][0], JailCellSpawns[rand][1], JailCellSpawns[rand][2]);
                    new rand1 = random(sizeof(JailCellSpawns1));
                    SetPlayerPos(pId, JailCellSpawns1[rand1][0], JailCellSpawns1[rand1][1], JailCellSpawns1[rand1][2]);
                    if(GetPlayerWantedLevel(pId) > 3) return SetTimerEx("Unjail",2000,false,"i",pId);
                    InJail[pId] = 1;
                    SetPlayerWantedLevel(pId, 0);
                    return 1;
                }
               }
               else if(GetPlayerSkin(playerid)) return SendClientMessage(playerid,0xFF0000FF,"You dont have permisson to acces this command");
    {
                       return 0;
            }
}
Reply


Messages In This Thread
How to assign a value[SOLVED] - by zack3021 - 09.09.2010, 00:41
Re: How to assign a value - by iggy1 - 09.09.2010, 01:05
Re: How to assign a value - by zack3021 - 09.09.2010, 01:26
Re: How to assign a value - by ••• ĤБĶБM ••• - 09.09.2010, 03:14
Re: How to assign a value - by zack3021 - 09.09.2010, 19:49
Re: How to assign a value - by Vince - 09.09.2010, 19:55
Re: How to assign a value - by i514x - 09.09.2010, 19:57
Re: How to assign a value - by zack3021 - 09.09.2010, 20:07
Re: How to assign a value - by i514x - 09.09.2010, 20:10
Re: How to assign a value - by zack3021 - 09.09.2010, 20:16

Forum Jump:


Users browsing this thread: 1 Guest(s)