|
What version of SA-MP are you trying to use with your gamemode? It's likely that your problem stems from the fact that sscanf 2.0 isn't working with 0.3d yet.
|
(no offense)
if(!IsPlayerConnect(targetid))
if(targetid == INVALID_PLAYER_ID) return error msg!
CMD:goto(playerid, params[])
{
new other;
if(sscanf(params,"u", other)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /goto [Id/Nme]");
new Float:plocx,Float:plocy,Float:plocz;
if(other != INVALID_PLAYER_ID)
{
if(UserInfo[playerid][AdminLevel] >= 1)
{
GetPlayerPos(other, plocx, plocy, plocz);
if(UserInfo[other][pInt] > 0)
{
SetPlayerInterior(playerid,UserInfo[other][pInt]);
UserInfo[playerid][pInt] = UserInfo[other][pInt];
}
if(UserInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid]{0} = 0.0;TelePos[playerid]{1} = 0.0;
SetPlayerInterior(playerid, GetPlayerInterior(other));
}
else
{
SetPlayerInterior(playerid, GetPlayerInterior(other));
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, COLOR_GRAD1, "You are teleported.");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You don't have rights.");
}
}
return true;
}
if(other != INVALID_PLAYER_ID)
if(other == INVALID_PLAYER_ID)