strcmp usage
#7

First of all, sscanf doesn't work like that.
pawn Код:
new
    driftid;

    if( sscanf( params, "i", driftid ) ) return SendClientMessage(...);
But in your case, I suggest you to use isnull like you used, without sscanf.
Also,
pawn Код:
if( strcmp( params, "1", true ) == 0 )
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            SetVehiclePos(GetPlayerVehicleID(playerid),-358.1943,1531.2909,75.1698);
            SetVehicleZAngle(GetPlayerVehicleID(playerid), 264.7289);
            SetCameraBehindPlayer(playerid);
        }
        else return SCM(playerid, -1, ""COL_RED"Error:"COL_GREY" You must be the driver of the vehicle.");
    }
    else
    {
        SetPlayerPos(playerid,-358.1943,1531.2909,75.1698);
        SetPlayerFacingAngle(playerid, 264.7289);
        SetCameraBehindPlayer(playerid);
    }
}
// Continue..
Reply


Messages In This Thread
strcmp usage - by Snowman12 - 28.01.2012, 20:52
Re: strcmp usage - by [ABK]Antonio - 28.01.2012, 21:12
Respuesta: strcmp usage - by OPremium - 28.01.2012, 21:15
Re: strcmp usage - by Dokins - 28.01.2012, 21:15
Re: strcmp usage - by =WoR=Varth - 28.01.2012, 21:17
Re: strcmp usage - by Mosslah - 28.01.2012, 21:17
Re: strcmp usage - by Konstantinos - 28.01.2012, 21:20
Re: strcmp usage - by Snowman12 - 28.01.2012, 21:29

Forum Jump:


Users browsing this thread: 3 Guest(s)