29.04.2012, 14:17
What's wrong with this codes? I'm making a vehicle spawner but it didn't put me in the vehicle. Here's the codes...
pawn Код:
CMD:v(playerid,params[])
{
new Float:P[4];
new veh = GetPlayerVehicleID(playerid);
if(sscanf(params,"i",veh)) return SCM(playerid,COLOR_RED,"[USAGE] /V [Vehicle ID]");
else if(veh < 400 || veh > 611) return SCM(playerid,COLOR_RED,"[ERROR] Invalid Vehicle ID");
else
{
GetPlayerPos(playerid,P[0],P[1],P[2]);
GetPlayerFacingAngle(playerid,P[3]);
CreateVehicle(veh,P[0],P[1],P[2],P[3],-1,-1,-1);
PutPlayerInVehicle(playerid,veh,0);
}
return 1;
}