01.04.2012, 14:41
I suppose /car should spawn a vehicle?
pawn Код:
YCMD:car(PARAMS)
{
#pragma unused help
new vxModel, Float:Pos[4], col1, col2;
if(sscanf(params, "iii", vxModel, col1, col2))
return SendClientMessage(playerid, -1, "Usage: /car[Model] Color1 Color2");
if(col1 < 0 || col2 < 0 || col1 > 126 || col2 > 126)
return SendClientMessage(playerid, -1, "Invalid color ID.");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(playerid, Pos[3]);
new cCar = CreateVehicle(vxModel, Pos[0], Pos[1], Pos[2], Pos[3], col1, col2, -1);
PutPlayerInVehicle(playerid, cCar, 0);
return 1;
}