Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - saberman

Pages: [1] 2
1
mIRC/pawn Scripting / Re: /c admins bugged
« on: June 06, 2011, 10:13:33 am »
What's wrong here?
[pawn]   else if (strcmp(cmd, "admins", true) == 0) {
   new Count,i,name[24],string[256];
   for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) Count++;
   if(!Count) return SendClientMessage(playerid, BLUE,"No admins ingame.");
   if(Count == 1)
   {
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) break;
   GetPlayerName(i,name,24);
   if(PlayerInfo[playerid][Level] == 5)
   {
         format(string,256,"Present Owners: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[playerid][Level] == 4)
   {
         format(string,256,"Present Managers: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[playerid][Level] == 3)
   {
         format(string,256,"Present Administrators: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[playerid][Level] == 2)
   {
         format(string,256,"Present Moderators: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   return 1;
   }
   if(Count >= 1)
   {
      new owners[128], managers[128], admins[128], mods[128];
      new bool:ofirst = false, bool:mfirst = false, bool:afirst = false, bool:mdfirst = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] == 5)
     {
         GetPlayerName(i,name,24);
         if(!ofirst)
         {
            format(owners,128,"Present Owners: %s(%d)",name,i);
            SendClientMessage(playerid, BLUE, owners);
            ofirst = true;
         }
         else format(owners,128,"%s, %s",owners,name);
      }
      SendClientMessage(playerid, BLUE, string);
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] == 4)
     {
         GetPlayerName(i,name,24);
         if(!mfirst)
         {
            format(managers,128,"Present Managers: %s(%d)",name,i);
            SendClientMessage(playerid, BLUE, managers);
            mfirst = true;
         }
         else format(managers,128,"%s, %s",managers,name);
      }
      SendClientMessage(playerid, BLUE, managers);
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] == 3)
     {
         GetPlayerName(i,name,24);
         if(!afirst)
         {
            format(admins,128,"Present Administrators: %s(%d)",name,i);
            SendClientMessage(playerid, BLUE, admins);
            afirst = true;
         }
         else format(admins,128,"%s, %s",admins,name);
      }
      SendClientMessage(playerid, BLUE, admins);
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] == 2)
     {
         GetPlayerName(i,name,24);
         if(!mdfirst)
         {
            format(mods,128,"Present Owners: %s(%d)",name,i);
            SendClientMessage(playerid, BLUE, mods);
            mdfirst = true;
         }
         else format(mods,128,"%s, %s",mods,name);
      }
      SendClientMessage(playerid, BLUE, mods);
   }
   GetPlayerName(playerid, name, 32);
   printf("%s has used /admins command");
   return 1;
}[/pawn]

2
mIRC/pawn Scripting / Re: /c admins bugged
« on: June 05, 2011, 07:30:49 pm »
Will do so this week. Thanks for the help.

3
mIRC/pawn Scripting / Re: /c alias and /c subalias commands help
« on: May 30, 2011, 05:49:44 pm »
Its their choice  ;)

4
mIRC/pawn Scripting / Re: /c admins bugged
« on: May 30, 2011, 05:48:53 pm »
Help please.

5
mIRC/pawn Scripting / Re: /c admins bugged
« on: May 30, 2011, 09:42:27 am »
[pawn]format(string,256,"Present Owners: %s(%d)",name,i);[/pawn]

Replace that with:
[pawn]format(string,256,"Present Owners: %s(%d)",name,PlayerInfo[Level]);[/pawn]
Actually the "i" is the ID of the person. Not the level :)

6
mIRC/pawn Scripting / Re: /c admins bugged
« on: May 29, 2011, 07:13:55 pm »
Another problem.
[pawn]   else if (strcmp(cmd, "admins", true) == 0) {
   new Count,i,name[24],string[256];
   for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) Count++;
   if(!Count) return SendClientMessage(playerid, BLUE,"No admins ingame.");
   if(Count == 1)
   {
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) break;
   GetPlayerName(i,name,24);
   if(PlayerInfo[Level] == 5)
   {
         format(string,256,"Present Owners: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[Level] == 4)
   {
         format(string,256,"Present Managers: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[Level] == 3)
   {
         format(string,256,"Present Administrators: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[Level] == 2)
   {
         format(string,256,"Present Moderators: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   return 1;
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[Level] == 5)
            {
               format(string,256,"Present Owners: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[Level] == 4)
            {
               format(string,256,"Present Managers: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[Level] == 3)
            {
               format(string,256,"Present Administrators: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[Level] == 2)
            {
               format(string,256,"Present Moderators: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   GetPlayerName(playerid, name, 32);
   printf("%s has used /admins command");
   return 1;
}[/pawn]
It says like, I set Dawood's level to 4(manager) and I have 5(Owner) and it says: "Present Owners: Sabreman(1), Dawood(0)"

How to fix it? Dawood's name should appear in Present Managers

7
mIRC/pawn Scripting / Re: /c admins bugged
« on: May 29, 2011, 06:53:37 pm »
Thanks a lot Storm!!!

8
mIRC/pawn Scripting / /c admins bugged
« on: May 28, 2011, 09:24:19 am »
[pawn]   else if (strcmp(cmd, "admins", true) == 0) {
   new Count,i,name[24],string[256];
   for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) Count++;
   if(!Count) return SendClientMessage(playerid, BLUE,"No admins ingame.");
   if(Count == 1)
   {
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2) break;
   GetPlayerName(i,name,24);
   if(PlayerInfo[playerid][Level] == 5)
   {
         format(string,256,"Present Owners: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[playerid][Level] == 4)
   {
         format(string,256,"Present Managers: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[playerid][Level] == 3)
   {
         format(string,256,"Present Administrators: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   if(PlayerInfo[playerid][Level] == 2)
   {
         format(string,256,"Present Moderators: %s(%d)",name,i);
         SendClientMessage(playerid, BLUE, string);
      }
   return 1;
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[playerid][Level] == 5)
            {
               format(string,256,"Present Owners: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[playerid][Level] == 4)
            {
               format(string,256,"Present Managers: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[playerid][Level] == 3)
            {
               format(string,256,"Present Administrators: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   if(Count >= 1)
   {
      new bool:First = false;
      for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[Level] >= 2)
     {
         GetPlayerName(i,name,24);
         if(!First)
       {
            if(PlayerInfo[playerid][Level] == 2)
            {
               format(string,256,"Present Moderators: %s(%d)",name,i);
               SendClientMessage(playerid, BLUE, string);
            }
            First = true;
         }
         else format(string,256,"%s, %s(%d)",string,name,i);
      }
      return SendClientMessage(playerid, BLUE, string);
   }
   GetPlayerName(playerid, name, 32);
   printf("%s has used /admins command");
   return 1;
}[/pawn]
Even administrators/managers/moderators(level 3/4/2) are shown in Present: Owners when there is one.

9
mIRC/pawn Scripting / Re: /c wanted bug
« on: May 28, 2011, 09:22:36 am »
Thanks for the help!

10
mIRC/pawn Scripting / /c wanted bug
« on: May 27, 2011, 05:16:30 pm »
[pawn]   else if(strcmp(cmd, "sus", true) == 0)
   {
      new tmp2[256]; new fbil[126]; fbil = dini_Get(file, "FBI"); new plr; plr = FindPlayerIDFromString(tmp);
      tmp = strtok(cmdtext, idx), tmp2 = strrest(cmdtext, idx);
      if(PlayerInfo[playerid][Cop] == 0 && strval(fbil) < 2) SendClientMessage(playerid, RED, "Only FBI Agent+ or a police officer can suspect!");
      else if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, RED, "You have to be logged in first!");
      else if(!strlen(tmp2)) SendClientMessage(playerid, RED, "USAGE: /c sus(pect) [id/name] [reason]");
      else if(!IsPlayerConnected(plr)) SendClientMessage(playerid, RED, "Target ID not found");
      else
      {
        format(szMsg, 256, "%s has been suspected by %s for %s", gPlayers[plr], gPlayers[playerid], tmp2);
        SendClientMessageToAll(GREEN, szMsg);
        PlayerInfo[plr][Wanted] = 1;
      }
      return 1;
   }
    else if (strcmp(cmd, "wanted", true) == 0)
   {
       new Count,i,name[24],string[256];
       for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[playerid][Wanted] > 0) Count++;
       if(!Count) return SendClientMessageToAll(BLUE,"No Wanted Players");
       if(Count == 1)
      {
          for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[playerid][Wanted] > 0) break;
          GetPlayerName(i,name,24);
          format(string,256,"Wanted Players: %s[%d]",name,PlayerInfo[Wanted]);
          return SendClientMessageToAll(BLUE,string);
       }
       if(Count >= 1)
      {
          new bool:First = false;
          for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && PlayerInfo[playerid][Wanted] > 0) {
          GetPlayerName(i,name,24);
          if(!First)
        {
             format(string,256,"Wanted Players: %s[%d],",name,PlayerInfo[Wanted]);
             First = true;
          }
          else format(string,256,"%s, %s[%d]",string,name,PlayerInfo[Wanted]);
       }
       return SendClientMessageToAll(BLUE,string);
    }
    return 1;
   }[/pawn]
Server crashes when I use the /c wanted command.

11
Its fixed, thank you for your help.

12
Code: (Pawn) [Select]
else if(strcmp(cmd, "wepequip", true) == 0)
{
   new tmp2[126], tmp3[126], wep[126]; tmp = strtok(cmdtext, idx), tmp2 = strtok(cmdtext, idx), tmp3 = strtok(cmdtext, idx); new targetname[32]; targetname[0] = FindPlayerIDFromString(tmp);
   wep[0] = FindWepIDFromString(tmp2); new fbil[126];
   fbil = dini_Get(file, "FBI");
   if(strval(fbil) > 2) SendClientMessage(playerid, RED, "You have to be Agent+ to use this command!");
   else if(!strlen(tmp3)) SendClientMessage(playerid, RED, "USAGE: /c wepequip [id] [weapon] [ammo]");
   else
   {
  printf("%s(%d) has given %s(%d) weapon %s ammo %d - /c wepequip", gPlayers[playerid], playerid, gPlayers[strval(targetname)], strval(targetname), wep, tmp3);
  format(szMsg, 256, "You have been issued %s with %d ammo", wep, tmp3);
  SendClientMessage(strval(targetname), GREEN, szMsg);
  format(szMsg, 256, "You issued %s with %d ammo to %s(%d)", wep, tmp3, gPlayers[strval(targetname)], strval(targetname));
  SendClientMessage(playerid, GREEN, szMsg);
  SetPlayerWeapon(strval(targetname), strval(wep), strval(tmp3));
   }
   return 1;
}
Quote
        format(szMsg, 256, "You have been issued %s with %d ammo", wep, tmp3, gPlayers[strval(targetname)], strval(targetname));
It says: "You have been issued   with 40-50(like that) ammo"
Also, it deletes all my weapons and ammo. I don't see whats bugged. Help me!

13
mIRC/pawn Scripting / Re: How to use INI's for FBI duty
« on: March 09, 2011, 05:29:02 pm »
Man LOL
i am making it Just relax i made FBI duty that if player FBI he  can /c fbiduty its in USERS FILE
FBI=0 if its 1 then player can on duty else NO
Okay lol, but do add a rank that one rank can give others a badge type of thing which will allow them to be FBI(badge = USERS = FBI) but I just wanted to know about it.

u want just Fbi? i can help

Yes, okay. And do add if possible that I can set FBI=1 in game in the server.
* saberman locks the topic
* saberman put's a anti-unlock system
* saberman completely lock's it

14
mIRC/pawn Scripting / Re: How to use INI's for FBI duty
« on: March 09, 2011, 02:18:13 pm »
Man LOL
i am making it Just relax i made FBI duty that if player FBI he  can /c fbiduty its in USERS FILE
FBI=0 if its 1 then player can on duty else NO
Okay lol, but do add a rank that one rank can give others a badge type of thing which will allow them to be FBI(badge = USERS = FBI) but I just wanted to know about it.

15
mIRC/pawn Scripting / Re: How to use INI's for FBI duty
« on: March 09, 2011, 02:09:20 pm »
Script made by heekz? omg :(

for COLOR_GREEN - upper
Code: [Select]
#define COLOR_GREEN 0x33AA33AA
now show me line 716... (Correction by me - 756)

dw about the color error it gives me all the times but it does gives me the AMX file.

Here's the line:
Code: [Select]
if(onduty[playerid] == 0) {
And here's the whole function and stuff...

Code: [Select]
else if(strcmp(cmdtext,"onduty", true) == 0) {
if(onduty[playerid] == 0) {
new file[256];
format(file, sizeof(file), FBI_Ranks);
if(!dini_Exists(file)) {
dini_Create(file);
        }
new sepd[MAX_PLAYER_NAME]; GetPlayerName(playerid,sepd,sizeof(sepd));
if(!strcmp(sepd,dini_Get(file,"Enforcer")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,3);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,17,1500);
SetPlayerWeapon(playerid,20,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as Enforcer!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}
else if(!strcmp(sepd,dini_Get(file,"Lietuant")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,1);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,17,1500);
SetPlayerWeapon(playerid,19,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as Lietuant!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}
   else if(!strcmp(sepd,dini_Get(file,"Lietuant")))
   {
SetSpikes(playerid,1);
SetPlayerSkin(playerid,1);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,17,1500);
SetPlayerWeapon(playerid,19,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as Lietuant!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}
else if(!strcmp(sepd,dini_Get(file,"attender")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,1);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,17,1500);
SetPlayerWeapon(playerid,19,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as attender!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}
else if(!strcmp(sepd,dini_Get(file,"undercover")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,1);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,17,1500);
SetPlayerWeapon(playerid,19,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as Undercover cop!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}

else if(!strcmp(sepd,dini_Get(file,"swat")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,1);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,18,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as Swat!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}
else if(!strcmp(sepd,dini_Get(file,"security")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,1);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,18,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as security guard!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}

else if(!strcmp(sepd,dini_Get(file,"Officer")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,1);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,17,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as a VCDP cop!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}

else if(!strcmp(sepd,dini_Get(file,"Fbi")))
{
SetSpikes(playerid,1);
SetPlayerSkin(playerid,102);
ResetPlayerWeapons(playerid);
SetPlayerWeapon(playerid,4,1);
SetPlayerWeapon(playerid,18,1500);
SetPlayerWeapon(playerid,20,1500);
SetPlayerWeapon(playerid,23,1500);
format(szMsg,sizeof(szMsg),"%s is now on duty as Fbi!",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE,szMsg);
SetPlayerTeam(playerid,15);
onduty[playerid] = 1;
}
}
return 1;
}

It's all your script heekz :P

Pages: [1] 2