Destroyveh command
#1

pawn Код:
CMD:veh(playerid, params[])
{
     if(!strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Error. Usage: /veh [modelid]"); //Check if the parameter exists.
     if(strval(params) > 611 || strval(params) < 400) return SendClientMessage(playerid, COLOR_RED, "Error. Models are between 400 and 611."); //Check if it's between 400 and 611.
     if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Трябва да влезите в профила си, за да използвате командите.");
     if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "Вие нямате права, за да използвате тази команда.");
     new Float:x, Float:y, Float:z; //Declare position variables.
     GetPlayerPos(playerid, x, y, z); //Get the players position, the vehicle will spawn in this position.
     PutPlayerInVehicle(playerid, CreateVehicle(strval(params), x, y, z, 0.0, -1, -1, -1), 0); //Create the vehicle, put the player in it as the driver.
     return 1; //Tell the server the command executed succesfully.
}
That's my command for veh. How must to be command for destroyveh ?
Reply


Messages In This Thread
Destroyveh command - by Yordan_Kronos - 06.05.2014, 10:53
Re : Destroyveh command - by yusei - 06.05.2014, 10:58
Re: Destroyveh command - by Yordan_Kronos - 06.05.2014, 11:01
Re: Destroyveh command - by Konstantinos - 06.05.2014, 11:06
Re: Destroyveh command - by Yordan_Kronos - 06.05.2014, 11:09
Re: Destroyveh command - by Yordan_Kronos - 06.05.2014, 11:11
Re: Destroyveh command - by Konstantinos - 06.05.2014, 11:17
Re : Destroyveh command - by yusei - 06.05.2014, 11:17
Re: Destroyveh command - by Yordan_Kronos - 06.05.2014, 11:20
Re: Destroyveh command - by Konstantinos - 06.05.2014, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)