Spawning vehicles with command makes the game stuck...
#7

Try using sscanf:

Код:
CMD:veh(playerid, params[])
{
	new modelid;
	if(sscanf(params, "i", modelid)) return SendClientMessage(playerid, red, "Error. Usage: /veh [modelid]");
	if(modelid > 611 || modelid < 400) return SendClientMessage(playerid, red, "Error. Models are between 400 and 611.");
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid, x, y, z);
	new playervehicle = CreateVehicle(modelid, x, y, z, 0.0, -1, -1, -1);
	PutPlayerInVehicle(playerid, playervehicle, 0);
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)