12.12.2014, 21:34
I think that this is not good.(↓)..
This better.. I recommend you use the sscanf slots in your commands, create variables that are not necessary in your script.
pawn Код:
#pragma tabsize 0
pawn Код:
CMD:v(playerid, params[])
{
new Float:pos[3]; //x //y // z
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(sscanf(params, "d", params[0])) return SendClientMessage(playerid,0xff0000ff,"USAGE: /Veh <Vehicle ID 400 - 611>");
if(params[0] < 400 || params[0] > 611) return SendClientMessage(playerid, 0xff0000ff, "ERROR: Cannot go under 400 or above 611.");
if(Vehicle[playerid] != 0)
{
DestroyVehicle(Vehicle[playerid]);
}
Vehicle[playerid] = CreateVehicle(params[0], pos[0], pos[1], pos[2]+ 2.0, 0, -1, -1, 1);
format(string,sizeof(string),"You Have Spawned Vehicle ID %i", params[0]);
SendClientMessage(playerid, 0xffffffff, string);
PutPlayerInVehicle(playerid, Vehicle[playerid], 0);
return true;
}