If (IsPlayerInVehicle()) - GameTextForAll()
#12

Quote:
Originally Posted by Don Correlli
Just set a variable in the command 1 and use the if-statement to check the variable in the command 2.
I'm too big of an amateur to understand that.. Something like this maybe?:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/disable", cmdtext, true, 10) == 0)
        {
         SetCMDStatus = Disabled;
        }
        else
        {
         SetCMDStatus = Enabled;
         }
     return 1;

}
    if (strcmp("/teleporter", cmdtext, true, 10) == 0)
    if(IsPlayerInAnyVehicle(playerid))
        {
        SendClientMessage(playerid,0x00FF00AA,"You're in a vehicle, get out of it first!");
        }
        else
        {
        SetPlayerPos(playerid,-119.5348,-368.5644,1.4297);
        SendClientMessage(playerid,0x00FF00AA,"Shut up and listen to the admin!.");
        return 1;
        }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)