Spawning a vehicle at current location
#8

I used the one from Peter Corneile as i do not have zcmd and sscanf, but when i type /spawnvehicle 512 (as example) in game nothing happens.
Code:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/spawnvehicle", true) == 0)
{
new vehicleid,Float:x,Float:y,Float:z,Float:A;
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid,A);
CreateVehicle(vehicleid,x+random(5),y+random(5),x+random(z), A,0,0,-1);
}
return 1;
}
I dont see any wrong things in this at the first place.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)