Vice City Multiplayer
General Discussion => General Discussion => Topic started by: Arber on November 28, 2012, 01:31:03 am
-
How to disable example: "/goto name" ??
thanks for read
-
How to disable example: "/goto name" ??
thanks for read
You can't disable a rcon command, but is protected by rcon pass.
From what we know, you have to be RCON Admin to can use "/goto" command.
-
No, i'm not admin on server and i can use /goto command and other commands
-
No, i'm not admin on server and i can use /goto command and other commands
You can't use /goto command if you aren't RCON Administrator !
If the owner of server made a cmd like " !goto " or "/c goto" for all players, thats anything else.
RCON Administrator is that player what type in the chat "/admin <password>"
-
[pawn]
new nogoto[MAX_PLAYERS]
public OnPlayerCommandText(playerid, cmdtext[])
{
new tmp[256];
if (strcmp("nogoto", cmd, true, 10) == 0)
{
tmp = strtok(cmdtext, idx);
if(nogoto[playerid] == 0)
{
nogoto[playerid] = 1;
SendClientMessage(playerid, red, "You are no longer accepting goto warps.");
}
else
{
nogoto[playerid] = 0;
SendClientMessage(playerid, lgr, "You are now accepting goto warps.");
}
return 1;
}
if (strcmp("goto", cmd, true, 10) == 0)
{
tmp = strtok( cmdtext, idx );
if (!strlen(tmp))
{
SendClientMessage(playerid, lgr, " /c goto [ID]");
return true;
}
new ID = strval(tmp);
if(nogoto[playerid] == 1) return SendClientMessage(playerid, red, "Sorry that player has goto disabled");
if (!IsPlayerConnected(ID))
{
SendClientMessage(playerid, 0xFFFFFFAA, " Invalid Player");
format( tmp, 128, "%s > Error < that > Player < isn't in the data base", Name[playerid]), SendClientMessage(playerid, red, tmp);
return true;
}
new Float:X, Float:Y, Float:Z;
if ( GetPlayerVehicleID( playerid ) )
{
GetPlayerPos( strval(tmp), X, Y, Z );
SetVehiclePos( GetPlayerVehicleID(playerid), X+2, Y+2, Z ,0);
GetPlayerName(ID, tmp, 128);
format(tmp, 128, "Teleported to (Player - %s, id - %d)", tmp, ID);
SendClientMessage(playerid, 0xFFFFFFAA, tmp);
format( tmp, 128, "Teleport to > %s < ID > %d <", tmp, ID), SendClientMessage(playerid, red, tmp);
}else{
GetPlayerPos( strval(tmp), X, Y, Z );
SetPlayerPos( playerid, X+2, Y+2, Z ,0 ,0);
GetPlayerName(ID, tmp, 128);
format( tmp, 128, "Teleport to > %s < ID > %d <", tmp, ID), SendClientMessage(playerid, red, tmp);
}
return 1;
}
}
[/pawn]