How do I make this code...
#1

How do I make this code to check whether your car before you says "You have successfully removed the vehicle."?

Код:
	if(strcmp(cmd, "/destroycar", true)== 0)
	{
	    if(PlayerInfo[playerid][pAdmin] > 1)
	    {
	        new removeVeh = GetPlayerVehicleID(playerid);
            SendClientMessage(playerid, COLOR_GRAD1, "You have successfully removed the vehicle.");
            DestroyVehicle(removeVeh);
	        return 1;
		}
		else
		{
            SendClientMessage(playerid, COLOR_GRAD1, "You are not an admin!");
		}
	}
Reply
#2

The way it looks...

It should be working fine..

Does it not say that when you type /destroycar?
Reply
#3

It you're working your work, but want to check when I am in my vehicle to see "You're not in the vehicle! ", not me, it appears that I successfully remove vehicle.
Reply
#4

pawn Код:
if(strcmp(cmd, "/destroycar", true)== 0)
    {
        if(PlayerInfo[playerid][pAdmin] > 1)
        {
            if(!IsPlayerInAnyVehicle(playerid))
                return SendClientMessage(playerid, COLOR_GRAD1, "You're not in the vehicle! ");
               
            new
                removeVeh = GetPlayerVehicleID(playerid);
               
            SendClientMessage(playerid, COLOR_GRAD1, "You have successfully removed the vehicle.");
            DestroyVehicle(removeVeh);
           
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD1, "You are not an admin!");
        }
Is that what you're looking for?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)