CMD:gethere(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2) { new id; if(sscanf(params, "r", id)) return SendClientMessage(playerid, 0x333666, "Correct usage: /gethere [ID]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0x333666, "Invalid playerid"); new Float:Pos[4], string[45], playeridname[MAX_PLAYER_NAME+1], idname[MAX_PLAYER_NAME+1]; SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id)); SetPlayerInterior(playerid, GetPlayerInterior(id)); GetPlayerPos(id, Pos[0], Pos[1], Pos[2]); GetPlayerFacingAngle(id, Pos[3]); SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); SetPlayerFacingAngle(playerid, Pos[3]); GetPlayerName(id, idname, sizeof(idname)); format(string, sizeof(string), "You have teleported %s to you.", idname); SendClientMessage(playerid, 0x333666, string); GetPlayerName(playerid, playeridname, sizeof(playeridname)); format(string, sizeof(string), "%s has teleported you to them", playeridname); SendClientMessage(id, 0x333666, string); } else { SendClientMessage(playerid, COLOR_RED, "You cannot use that command"); } return 1; }
CMD:gethere(playerid, params[])
{
new playerb, string[128];
new Float:Pos[3];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /goto [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playerb][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you.");
if(Spec[playerb]) return SendClientMessage(playerid, COLOR_GREY, "Player is spectating someone.");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(IsPlayerInAnyVehicle(playerb) && GetPlayerState(playerb) == PLAYER_STATE_DRIVER && !GetPlayerInterior(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerb), Pos[0]+2, Pos[1]+2, Pos[2]);
}
else
{
SetPlayerPos(playerb, Pos[0]+1, Pos[1], Pos[2]);
}
SetPlayerInterior(playerb, GetPlayerInterior(playerid));
SetPlayerVirtualWorld(playerb, GetPlayerVirtualWorld(playerid));
format(string, sizeof(string), " You have teleported %s to you.", RPN(playerb));
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " You have been teleported to admin %s.", RPN(playerid));
SendClientMessage(playerb, COLOR_WHITE, string);
return 1;
}
CMD:gethere(playerid, params[])
{
new playerb, string[128];
new Float:Pos[3];
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /goto [playerid]");
if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playerb][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you.");
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(IsPlayerInAnyVehicle(playerb) && GetPlayerState(playerb) == PLAYER_STATE_DRIVER && !GetPlayerInterior(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerb), Pos[0]+2, Pos[1]+2, Pos[2]);
}
else
{
SetPlayerPos(playerb, Pos[0]+1, Pos[1], Pos[2]);
}
SetPlayerInterior(playerb, GetPlayerInterior(playerid));
SetPlayerVirtualWorld(playerb, GetPlayerVirtualWorld(playerid));
return 1;
}
C:\Users\Michael\Desktop\Roleplay\gamemodes\Wildside.pwn(1290) : error 017: undefined symbol "RPN" C:\Users\Michael\Desktop\Roleplay\gamemodes\Wildside.pwn(1292) : error 017: undefined symbol "RPN" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Thankyou! but theres one problem
Код:
C:\Users\Michael\Desktop\Roleplay\gamemodes\Wildside.pwn(1290) : error 017: undefined symbol "RPN" C:\Users\Michael\Desktop\Roleplay\gamemodes\Wildside.pwn(1292) : error 017: undefined symbol "RPN" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
SetPlayerInterior(playerid, GetPlayerInterior(id));
GetPlayerPos(id, Pos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(id, Pos[3]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerFacingAngle(playerid, Pos[3]);
SetPlayerVirtualWorld(id, GetPlayerVirtualWorld(playerid)); //Set target to your vw, not your vw to the target's
SetPlayerInterior(id, GetPlayerInterior(playerid)); //Set target to your interior, not your interior to the target's
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); //Get your position
GetPlayerFacingAngle(playerid, Pos[3]); //Get your angle
SetPlayerPos(id, Pos[0], Pos[1], Pos[2]); //Set the target to this position
SetPlayerFacingAngle(id, Pos[3]); //Set the target to this angle