/aduty teleport
#1

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?
Reply
#2

add
pawn Код:
if( IsPlayerAdmin[playerid] == 1) // this checks if they are rcon admin
change it to suit your needs.
Reply
#3

Can u please tell me where to put it exactly? I am getting errors
Reply
#4

under dcmd_goto , btw soz i haven't used that code in a while, its IsPlayerAdmin(playerid) just like that. my bad :d
Reply
#5

(I think) IsPlayerAdmin only checking for RCON admins. Not sure tho.
Reply
#6

Compiles just fine, but doesnt work
Reply
#7

Do you have a enum or PVar's that define a players admin level?
Reply
#8

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
Reply
#9

LuxAdmin Modified. That /aduty is mine
Reply
#10

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
}
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)