SA-MP Forums Archive
Change in cmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Change in cmd (/showthread.php?tid=437054)



Change in cmd - Geeboi_Mehdi - 13.05.2013

i have a flip cmd but its not that much of pro for example if the passenger does /flip it does flip so can you help me so it only flips if the driver does it?
here is the one i have now
pawn Код:
if(strcmp(cmdtext, "/flip", true) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new currentveh;
            currentveh = GetPlayerVehicleID(playerid);
            if(GetVehicleModel(currentveh) == 519 || GetVehicleModel(currentveh) == 520)
            SendClientMessage(playerid, -1, "You cannot do this in an airplane");
            }
                new Float:angle;
                GetVehicleZAngle(currentveh, angle);
                SetVehicleZAngle(currentveh, angle);
                SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been flipped.");
            }
            return 1;
    }



AW: Change in cmd - HurtLocker - 13.05.2013

if(GetPlayerState(playerid)== PLAYER_STATE_DRIVER)


Re: Change in cmd - Geeboi_Mehdi - 14.05.2013

where should i add it? like can you tell me the cmd fully?


Re: Change in cmd - Skyrise - 14.05.2013

pawn Код:
if(strcmp(cmdtext, "/flip", true) == 0)
{
    if(IsPlayerInAnyVehicle(playerid)&&GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new currentveh, Float:angle;
        currentveh = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(currentveh) == 519 || GetVehicleModel(currentveh) == 520) return SendClientMessage(playerid, -1, "You cannot do this in an airplane");
        GetVehicleZAngle(currentveh, angle);
        SetVehicleZAngle(currentveh, angle);
        SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been flipped.");
        return 1;
    }
}



Re: Change in cmd - Geeboi_Mehdi - 14.05.2013

pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
worked thanks so much man +1 for both