10.06.2015, 14:36
Quote:
Code:
CMD:goto(playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be RCON for use this command"); new ID; new pn[MAX_PLAYER_NAME]; new an[MAX_PLAYER_NAME]; new str[128]; if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /goto [ID]"); if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected"); GetPlayerName(playerid, an, MAX_PLAYER_NAME); GetPlayerName(ID, pn, MAX_PLAYER_NAME); new Float:x; new Float:y; new Float:z; GetPlayerPos(ID, x, y, z); SetPlayerPos(playerid, x+1, y+1, z); format(str, sizeof(str), "You have been teleported to %s", pn); SendClientMessage(playerid, 0x00FF00AA, str); if(IsPlayerInAnyVehicle(playerid)) { GetPlayerPos(ID, x, y, z); SetVehiclePos(playerid, x+1, y+1, z); } return 1; } You need to be RCON for use this command I tried to join the server with the rcon password it's the same And i am the owner of the server I can't use that command help.. |
Because you have a statement right at the top saying...
Code:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be RCON for use this command");
pawn Code:
YCMD:goto(playerid, params[]) {
new playa;
if (!sscanf(params, "k<playerLookup_acc>", playa)) {
if(!IsPlayerConnectEx(playa)) {
SendClientMessage(playerid, X11_WHITE, "Invalid player!");
return 1;
}
new Float:X,Float:Y,Float:Z,vw,interior;
GetPlayerPos(playa, X, Y, Z);
vw = GetPlayerVirtualWorld(playa);
interior = GetPlayerInterior(playa);
if(IsPlayerInAnyVehicle(playerid)) {
new carid = GetPlayerVehicleID(playerid);
TPEntireCar(carid, interior, vw);
LinkVehicleToInterior(carid, interior);
SetVehicleVirtualWorld(carid, vw);
SetVehiclePos(carid, X, Y, Z);
} else {
SetPlayerPos(playerid, X, Y, Z);
}
SetPlayerVirtualWorld(playerid, vw);
SetPlayerInterior(playerid,interior);
SendClientMessage(playerid, X11_ORANGE, "You have been teleported.");
} else {
SendClientMessage(playerid, X11_WHITE, "USAGE: /goto [playerid/name]");
}
return 1;
}