SSCANF2 warnings
#7

pawn Код:
CMD:veh(playerid, params[])
{
    if(pInfo[playerid][Adminlevel] < 1) return SCM(playerid, COLOR_ERROR, ""ERROR_MESSAGE"");
    if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_ERROR, "You can not use this command from an vehicle");
    new aVehicle[64], Color1, Color2,string[100];
    if(sscanf(params, "s[64]I(-1)I(Color1)", aVehicle, Color1, Color2)) return SendClientMessage(playerid,COLOR_ERROR, "USAGE: /veh (Vehicle Name/ID) (color) (color)");
    new veh = GetVehicleModelIDFromName(aVehicle);
    if(veh < 400 || veh > 611) return SendClientMessage(playerid,COLOR_ERROR, "Invalid Vehicle Name.");
    new Float:Pos[4];
    GetPlayerPos(playerid, Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(playerid, Pos[3]);
    pVeh = cVeh = CreateStaticVehicle(VEHICLE_TYPE_CIVILIAN,veh, Pos[0], Pos[1], Pos[2]+10, Pos[3]+90, Color1, Color2);
    LinkVehicleToInterior(pVeh, GetPlayerInterior(playerid));
    SetVehicleVirtualWorld(pVeh, GetPlayerVirtualWorld(playerid));
    format(string,sizeof(string),"You have spawned %s - id %d with color %d - %d type normal.",VehicleNames[veh - 400],veh,Color1,Color2);
    SCM(playerid,COLOR_SKYBLUE,string);
    GameTextForPlayer(playerid, "~y~Enjoy your new ~r~ride", 2000, 1);
    return 1;
}
Reply


Messages In This Thread
SSCANF2 warnings - by AroseKhanNiazi - 25.07.2014, 13:20
Re: SSCANF2 warnings - by zT KiNgKoNg - 25.07.2014, 13:30
Re: SSCANF2 warnings - by AroseKhanNiazi - 25.07.2014, 13:33
Re: SSCANF2 warnings - by AroseKhanNiazi - 26.07.2014, 13:38
Re: SSCANF2 warnings - by Konstantinos - 26.07.2014, 13:43
Re: SSCANF2 warnings - by SanAndreasMP - 26.07.2014, 14:38
Re: SSCANF2 warnings - by AroseKhanNiazi - 26.07.2014, 14:53
Re: SSCANF2 warnings - by AroseKhanNiazi - 26.07.2014, 15:50
Re: SSCANF2 warnings - by v01d - 26.07.2014, 16:37
Re: SSCANF2 warnings - by SanAndreasMP - 26.07.2014, 16:43

Forum Jump:


Users browsing this thread: 1 Guest(s)