/aduty teleport - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /aduty teleport (
/showthread.php?tid=261521)
/aduty teleport - ColdIce - 13.06.2011
pawn Код:
dcmd_goto(playerid,params[])
{
if(!strlen(params)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /goto [PlayerID]") &&
SendClientMessage(playerid, orange, "Function: Will Go to specified player");
if(GetPVarInt(playerid,"ImInADMZone") == 1) return SendClientMessage(playerid,COLOR_RED,"If you want to teleport use /leavedm");
new player1;
new string[128];
if(!IsNumeric(params))
player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(GetPVarInt(player1,"AdutyOn") == 1) return SendClientMessage(playerid, -1, "Admin is on duty, please do not disturb");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
{
I want admins to be able to tp to me, not regular players. How can I do that?
Re: /aduty teleport -
xalith - 13.06.2011
add
pawn Код:
if( IsPlayerAdmin[playerid] == 1) // this checks if they are rcon admin
change it to suit your needs.
Re: /aduty teleport - ColdIce - 13.06.2011
Can u please tell me where to put it exactly? I am getting errors
Re: /aduty teleport -
xalith - 13.06.2011
under dcmd_goto , btw soz i haven't used that code in a while, its IsPlayerAdmin(playerid) just like that. my bad :d
Re: /aduty teleport -
futuretrucker - 13.06.2011
(I think) IsPlayerAdmin only checking for RCON admins. Not sure tho.
Re: /aduty teleport - ColdIce - 13.06.2011
Compiles just fine, but doesnt work
Re: /aduty teleport -
futuretrucker - 13.06.2011
Do you have a enum or PVar's that define a players admin level?
Re: /aduty teleport -
xalith - 13.06.2011
Quote:
Originally Posted by futuretrucker
(I think) IsPlayerAdmin only checking for RCON admins. Not sure tho.
|
Quote:
Originally Posted by xalith
add
pawn Код:
if( IsPlayerAdmin[playerid] == 1) // this checks if they are rcon admin
change it to suit your needs.
|
what are you using, Ladmin,gadmin?? i'll do it for you
Re: /aduty teleport - ColdIce - 13.06.2011
LuxAdmin
Modified. That /aduty is mine
Re: /aduty teleport -
futuretrucker - 13.06.2011
Idk how Lux admin is. Sorry man. But somwheres there might be something like
pawn Код:
pInfo[playerid][adminlevel]
You could use it like
pawn Код:
if(pInfo[playerid][adminlevel] > 5)
{
//code
}