SA-MP Forums Archive
Status - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Status (/showthread.php?tid=288270)



Status - wumpyc - 07.10.2011

How can i make like if player used /buyturtle then he can use /goturtle?

please help me


Re: Status - [GOD]Dragonster82 - 07.10.2011

Please be more specific? What do you want your turtle to do.


Re: Status - Wesley221 - 07.10.2011

When you do /buyturtle, change a variable to '1'.
pawn Код:
new HasTurtle[MAX_PLAYERS]; // global variable, add this on top of yours cript

CMD:buyturtle(playerid, params[])
{
// allt he codes from /turtle here
    HasTurtle[playerid] = 1;
    return 1;
}

CMD:gotturtle(playerid, params[])
{
    switch( HasTurtle[playerid] )
    {
        case 0: // when the player has no turtle
        {
 
        }
        case 1: // when the player has a turtle
        {

        }
    }
    return 1;
}