SA-MP Forums Archive
if - 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)
+--- Thread: if (/showthread.php?tid=618541)



if - Spenker - 07.10.2016

Don't show message "Work!".
Код HTML:
public OnPlayerDeath(playerid, killerid, reason)
{
     if(killerid != INVALID_PLAYER_ID)
     {
          if(!(IsACop(killerid) || pInfo[playerid][aVar][79] == 1 || pInfo[playerid][aVar][108] == 1 || pInfo[playerid][pJailed] > 0 || pInfo[playerid][pAJailed] > 0 || pInfo[playerid][aVar][99] == 1 || (pInfo[playerid][aVar][23] > 0 && pInfo[killerid][pMember] == 8) || (WarOnOff > 0 && IsAMember(playerid) && IsAMember(killerid))))
          {
               SendClientMessage(playerid, 0x60BF61FF, "Work!");
          }
     }
     return 1;
}
pInfo[playerid][aVar][79] it is equal with 0.
"!" not work?


Re: if - StrikerZ - 07.10.2016

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     if(killerid != INVALID_PLAYER_ID)
     {
          if(!IsACop(killerid) || pInfo[playerid][aVar][79] == 1 || pInfo[playerid][aVar][108] == 1 || pInfo[playerid][pJailed] > 0 || pInfo[playerid][pAJailed] > 0 || pInfo[playerid][aVar][99] == 1 || pInfo[playerid][aVar][23] > 0 && pInfo[killerid][pMember] == 8 || WarOnOff > 0 && IsAMember(playerid) && IsAMember(killerid)
          {
               SendClientMessage(playerid, 0x60BF61FF, "Work!");
          }
     }
     return 1;
}
Try this


Re: if - Spenker - 07.10.2016

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     if(killerid != INVALID_PLAYER_ID)
     {
          if(!IsACop(killerid) || pInfo[playerid][aVar][79] == 1 || pInfo[playerid][aVar][108] == 1 || pInfo[playerid][pJailed] > 0 || pInfo[playerid][pAJailed] > 0 || pInfo[playerid][aVar][99] == 1 || pInfo[playerid][aVar][23] > 0 && pInfo[killerid][pMember] == 8 || WarOnOff > 0 && IsAMember(playerid) && IsAMember(killerid)
          {
               SendClientMessage(playerid, 0x60BF61FF, "Work!");
          }
     }
     return 1;
}
Try this
Not work.


Re: if - Marven - 07.10.2016

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     if(killerid != INVALID_PLAYER_ID)
     {
          if(!IsACop(killerid) || pInfo[playerid][aVar][79] == 1 || pInfo[playerid][aVar][108] == 1 || pInfo[playerid][pJailed] > 0 || pInfo[playerid][pAJailed] > 0 || pInfo[playerid][aVar][99] == 1 || pInfo[playerid][aVar][23] > 0 && pInfo[killerid][pMember] == 8 || WarOnOff > 0 && IsAMember(playerid) && IsAMember(killerid))
          {
               SendClientMessage(playerid, 0x60BF61FF, "Work!");
          }
     }
     return 1;
}
This should work.


Re: if - Spenker - 07.10.2016

Not.


Re: if - Yaa - 07.10.2016

Wtf is that

rofl why all this if ( ....

just don't make it in one

if (!IsACop(killerid))
{
code.
}else if (pInfo[playerid][aVar][79] == 1)
{
code.....
Etc make it like this

Do smth like that