#8

Код:
CMD:goto(playerid, params[])
{
	new id;
	if(PlayerInfo[playerid][pAdmin] < 1)return SendAdmin(playerid, "Not admin!");
	if(sscanf(params, "u", id))return Use(playerid, "/goto [name/ID]");
	new car=GetPlayerVehicleID(playerid);
	new Float:x, Float:y, Float:z;
	GetPlayerPos(id, x, y, z);
	if(car==0)
	{
		SetPlayerPos(playerid, x+1, y, z);
	}
	else
	{
		SetVehiclePos(car, x+3, y, z);
	}
	SendClientMessage(playerid, Grey, "Teleport.");
	return 1;
}
have a look at the updated sscanf, compiled by Scott, which works well with the "u" specifier:
http://forum.sa-mp.com/showthread.ph...ghlight=sscanf (6th post)
Reply


Messages In This Thread
goto - by Speed - 17.11.2011, 21:24
Re: goto - by Kingunit - 17.11.2011, 21:33
Re: goto - by Speed - 17.11.2011, 21:34
Re: goto - by Kingunit - 17.11.2011, 21:35
Re: goto - by Speed - 17.11.2011, 21:37
Respuesta: goto - by admantis - 17.11.2011, 21:39
Re: goto - by Kingunit - 17.11.2011, 21:40
AW: goto - by Babul - 17.11.2011, 21:43

Forum Jump:


Users browsing this thread: 1 Guest(s)