HELP !
#4

I made it and it works now, here's the code:

pawn Код:
COMMAND:v(playerid, params[])
{
        if(sscanf(params, "s", Vehicle)) return SendClientMessage(playerid, 0xF81414FF, "USAGE: /v [name].");


               
                GetPlayerPos(playerid, X, Y, Z);
               
                new veh = GetVehicleModelIDFromName(Vehicle);
               
                if(veh < 400 || veh > 611) return SendClientMessage(playerid, 0xFFFFFFFF, "This is not a valid vehicle name! Please try again ");


                new PVeh = CreateVehicle(veh, X, Y, Z, 0.0, 0, 0, 200);
               
                format(String, sizeof String, "You spawned a %s. ID: %i. ", aVehicleNames[veh - 400], veh);
                SendClientMessage(playerid, 0xFFFFFFFF, String);

        return 1;
}
but thank you both for the reply anyways!
Reply


Messages In This Thread
HELP ! - by NickHaudMTA - 17.11.2014, 18:12
Re: HELP ! - by HY - 17.11.2014, 18:23
Re : HELP ! - by Dutheil - 17.11.2014, 18:31
Re: HELP ! - by NickHaudMTA - 17.11.2014, 18:43
Re : HELP ! - by Dutheil - 17.11.2014, 19:43

Forum Jump:


Users browsing this thread: 1 Guest(s)