How do i make A filterscript Rcon only
#1

Name says everything pls help
Reply
#2

What do you mean?
Use
if(IsPlayerAdmin(playerid)
Reply
#3

Quote:
Originally Posted by miley1
View Post
Name says everything pls help
Try:

https://sampwiki.blast.hk/wiki/IsPlayerAdmin
Reply
#4

I want that poeple can only Use my filterscript If they are logged into the rcon , does this make my wish come true ?:: if(IsPlayerAdmin(playerid) XD
Reply
#5

Yes,but what are doing this FS?
If you are using a command you need to put
Code:
if(IsPlayerAdmin(playerid))
{
//codes
}
Reply
#6

What you mean "use my filterscript"..?If you load the filterscript in server.cfg - everyone can use it.

Maybe you refer to the functions inside?

Then use just:

pawn Code:
if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "Welcome admin!");
    else SendClientMessageToAll(0xDEEE20FF, "You're not an admin!");
Reply
#7

I mean I dont want poeple to abuse my filterscript or even use it so i want it RCON only so only i may use it
Reply
#8

post it then so we can see what it is. you've gave little information
Reply
#9

Quote:
Originally Posted by TzAkS.
View Post
Yes,but what are doing this FS?
If you are using a command you need to put
Code:
if(IsPlayerAdmin(playerid))
{
//codes
}
i tried this but still able without rcon and without admin
Reply
#10

pawn Code:
{
    if (strcmp("/tune", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Your car has not been tuned as you're not in one.");
        TuneVehicleRandomly(GetPlayerVehicleID(playerid));
        return SendClientMessage(playerid,-1,"Your car has been tuned.");
    }
    return 0;
}
Reply
#11

This is works only if you are a rcon admin
Code:
if (strcmp("/tune", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin!");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Your car has not been tuned as you're not in one.");
        TuneVehicleRandomly(GetPlayerVehicleID(playerid));
        return SendClientMessage(playerid,-1,"Your car has been tuned.");
    }
    return 0;
}
Reply
#12

Thanks bro u great ill try it Free rep for you if it works ^^
Reply
#13

Sup bro it works Rep for u also i want to know how to make it for admin only that admin level 1+ can use it Just incase my admins become mad because they cant use it anymore xD [[[[2 reps for u]]]]
Reply
#14

He means that only people logged into the RCON are able to use a specific filterscript. I dunno if you guys already got that but...
Reply
#15

Quote:
Originally Posted by miley1
View Post
Sup bro it works Rep for u also i want to know how to make it for admin only that admin level 1+ can use it Just incase my admins become mad because they cant use it anymore xD [[[[2 reps for u]]]]
What admin system are you using?
Reply
#16

Guys i think I already found it Out Thanks Anyway , Blessed Thanks for saying but i already got answer haha , anyway i Use Ravengm im not sure wich admin system
Reply
#17

Maybe this help i found this in a command

PHP Code:
        tmp strtok(cmdtextidx);
        if(!
strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 4
Reply
#18

Code:
if (strcmp("/tune", cmdtext, true, 10) == 0)
    {
        if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "You are not an admin!");
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Your car has not been tuned as you're not in one.");
        TuneVehicleRandomly(GetPlayerVehicleID(playerid));
        return SendClientMessage(playerid,-1,"Your car has been tuned.");
    }
    return 0;
}
Reply
#19

Thanks Snipa U a legend Ima test it out if it works 2+ rep For u Bro
Reply
#20

Those Errors i got with your Lines bro


PHP Code:
C:\Users\Snor!\Desktop\Real Life ENG\filterscripts\tune.pwn(34) : warning 217loose indentation
C
:\Users\Snor!\Desktop\Real Life ENG\filterscripts\tune.pwn(43) : warning 213tag mismatch
C
:\Users\Snor!\Desktop\Real Life ENG\filterscripts\tune.pwn(214) : error 017undefined symbol "PlayerInfo"
C:\Users\Snor!\Desktop\Real Life ENG\filterscripts\tune.pwn(214) : warning 215expression has no effect
C
:\Users\Snor!\Desktop\Real Life ENG\filterscripts\tune.pwn(214) : error 001expected token";"but found "]"
C:\Users\Snor!\Desktop\Real Life ENG\filterscripts\tune.pwn(214) : error 029invalid expressionassumed zero
C
:\Users\Snor!\Desktop\Real Life ENG\filterscripts\tune.pwn(214) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)