17.07.2011, 18:59
Easiest way:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/car", cmdtext, true, 4))
{
new vehicle = strval(cmdtext[5]);
if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, 0xFFFFFFFF, "Error: invalid vehicle id");
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateVehicle(vehicle, x+2,y+2,z,a,-1,-1,-1);
return 1;
}
return 0;
}