I dont want people to spam some commands
#4

pawn Код:
new Spawned[MAX_PLAYERS];//global varible
pawn Код:
Spawned[playerid] = 0;// add under onplayerconnect
pawn Код:
if (strcmp("/nrg", cmdtext, true, 10) == 0)
{
if(Spawned[playerid] == 1)
{
SendClientMessage(playerid, yourcolor, " You already spawned a nrg500");
retrun 1;
}
        new Float: X, Float: Y, Float: Z, Float: A;
        GetPlayerPos(playerid,X,Y,Z);
        GetPlayerFacingAngle(playerid,A);
        new car = CreateVehicle(522,X,Y,Z,A,-1,-1,120000);
        PutPlayerInVehicle(playerid,car,0);
             Spawned[playerid] = 1;
        return 1;
    }
not tested should work tho
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)