[Help] Jetpack
#1

Hello , i created a command for jetpack but when i press F it throw it and then if i again use /jetpack it get another one jetpack and the old one is still there and in this way i can spawn alot of jetpacks . So i want to remove this system . If a player remove the jetpack and use /jetpack again the same jetpack disappear and a new one is attached to his body and if IsPlayerAdmin = true then an error occur saying "You can't get this item".
(I won't set the error to IsPlayerAdmin i will change it if some body gives me the code but actually what exactly i want is the give access of this function only to premium members but i can do it by mself.)
Following is my jetpack command code.
PHP код:
CMD:jetpack(playeridparams[])
{
    
LoginCheck(playerid);
    
SpawnCheck(playerid);
    
    if(
User[playerid][accountAdmin] >= || User[playerid][accountJP] == 1)
    {
        if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playeridCOLOR_RED"[JETPACK] "white"You are already using a jetpack.");
        
SetPlayerSpecialAction(playeridSPECIAL_ACTION_USEJETPACK);
        
SendClientMessage(playeridCOLOR_RED"[JETPACK] "white"You have spawned your premium jetpack.");
    }
    else
    {
        
SendClientMessage(playerid, -1"» "red"You do not have the power to use this command.");
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)