31.12.2014, 03:33
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.
(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(playerid, params[])
{
LoginCheck(playerid);
SpawnCheck(playerid);
if(User[playerid][accountAdmin] >= 1 || User[playerid][accountJP] == 1)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playerid, COLOR_RED, "[JETPACK] "white"You are already using a jetpack.");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
SendClientMessage(playerid, COLOR_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;
}