[Help]LAdmin Filterscript Problem[Dcmd_Slap]
#1

Hi! Im using LAdmin, and I have editted it a bit, but I couldnt edit it as I wanted:

pawn Код:
dcmd_slap(playerid,params[]) {
    if(PlayerInfo[playerid][LoggedIn] == 1) {
        if(PlayerInfo[playerid][Level] >= 2) {
          new tmp[256], tmp2[256], Index;       tmp = strtok(params,Index), tmp2 = strtok(params,Index);
          if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /slap [playerid] [reason/with]");
        new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            player1 = strval(tmp);
           
            GetPlayerName(player1, playername, sizeof(playername));
            GetPlayerName(playerid, adminname, sizeof(adminname));
            CMDMessageToAdmins(playerid,"SLAP");
            new Float:Health, Float:x, Float:y, Float:z; GetPlayerHealth(player1,Health); SetPlayerHealth(player1,Health-40);
            GetPlayerPos(player1,x,y,z); SetPlayerPos(player1,x,y,z+10); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(player1,1190,0.0,0.0,0.0);

            if(strlen(tmp2)) {
                format(string,sizeof(string),"You have been slapped by Administrator %s for %s",adminname,params[2]);   SendClientMessage(player1,red,string);
                format(string,sizeof(string),"You have slapped %s for %s ",playername,params[2]); return SendClientMessage(playerid,blue,string);
                } else {
                format(string,sizeof(string),"You have been slapped by Administrator %s ",adminname);   SendClientMessage(player1,red,string);
                format(string,sizeof(string),"You have slapped %s",playername); return SendClientMessage(playerid,blue,string); }
        } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
    } else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
I did this so you were able to slap yourself... However, some admins are abusing and slapping admins that are higher than them. I dont want to demote, but how can i edit this so that you can only slap admins that are the same level as you?

Basically, i want it to check weather the player that is being slapped is a higher level than the admin... If yes, then the slap doesnt work...
Reply
#2

Really sorry for bump, but please post if you know the answer...
Reply
#3

Please someone answer this.

Note: The smart asses out there who think this is a bump, plz don't post here! This is not a bump as I am posting 12 hours later than my last post!
Reply
#4

Wow yeah, Please Use { and } in your script, and line it out 0.o
Reply
#5

Quote:
Originally Posted by Rickyboy30
Wow yeah, Please Use { and } in your script, and line it out 0.o
Dude, this isn't my script... I took it from LAdmin! Anyways, could you write a more helpful remark and try to answer my question!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)