/get command.
#1

It doesn't get the playerid's vehicle to the user of /get position:

Код:
	if(!strcmp(cmd,"/get",true))
	{
	if(!PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"[Error:] You need to be a level 1 admin");
	new Float:Pos[3];
	tmp = strtok(cmdtext,idx);
	new id = strval(tmp);
	if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"[Usage:] /Get [ID]");
	if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[Error:] Invalid ID");
	if(!PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"[Error:] You need to be a level 1 admin");
    if(playerid == id) return SendClientMessage(playerid,COLOR_RED,"[Error:] You can't teleport yourself");
	GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
	SetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
	if(IsPlayerInAnyVehicle(playerid)) return SetVehiclePos(GetPlayerVehicleID(playerid), Pos[0],Pos[1],Pos[2]);
	format(string,sizeof(string),"[Server:] You have teleported %s to you",GetName(id));
	SendClientMessage(playerid,COLOR_WHITE,string);
	return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)