27.01.2010, 17:57
You use sscanf wrong.
Didn't you read the Tutorial on the wiki?!
#Added#: I just noticed: If you want the car not to respawn try this:
pawn Код:
zcmd(v, playerid, params[])
{
new vehicle, string[128];
if (!sscanf(params, "i", vehicle)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /v [vehicleid]");
new Float:x,Float:y, Float:z, Float:angle;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,angle);
CreateVehicle(vehicle, x, y, z, angle, 0, 0, 9999999999);
format(string,sizeof(string),"You have spawned VID %d at your location.",vehicle);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
#Added#: I just noticed: If you want the car not to respawn try this:
pawn Код:
CreateVehicle(vehicle, x, y, z, angle, 0, 0, -1);