- เครดิต
- 155
- ความรู้
-
- เงิน $
-
- ความดี
-
|
public OnWarStart()
{
for(new g=0; g < 30; g++)
{
WarMoney[g] = 50000;// ¨Ó¹Ç¹à§Ô¹ã¹¶Ø§µÍ¹àÃÔèÁÇÍ
WarRob[g] = 0;
gDoor[g] = 10;// ¾Åѧ»éͧ¡Ñ¹¢Í§»ÃеÙ
DefDelay[g] = 0;
ATKDelay[g] = 0;
}
for(new i=0; i != 100; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLeader] != 0)
{
CanWar[PlayerInfo[i][pLeader]] = 1;
}
}
}
}
forward OnWarEnd();
public OnWarEnd()
{
new string[128],gtext[30];
if(WarWin != 0)
{
if(WarWin ==5) { gtext = "ÁÒà¿ÕÂ"; }
else if(WarWin ==6) { gtext = "ÂÒ¡Ø«èÒ"; }
else if(WarWin ==8) { gtext = "¹Ñ¡ÅèÒ¤èÒËÑÇ"; }
else if(WarWin ==12) { gtext = "á¡ê§¤ìà¢ÕÂÇ"; }
else if(WarWin ==13) { gtext = "á¡ê§¤ìÁèǧ"; }
else if(WarWin ==14) { gtext = "á¡ê§¤ìàËÅ×ͧ"; }
else if(WarWin ==15) { gtext = "á¡ê§¤ì¿éÒ"; }
}
else
{
gtext = "äÁèÁÕ";
}
format(string,128,"[»ÃСÒÈ]: á¡ê§·Õ誹ФÃÑ駹Õé¤×Í %s ÊÒÁÒöªÔ§à§Ô¹ÁÒä´é¨Ó¹Ç¹ %d",gtext,WarTopMoney);
SendClientMessageToAll(COLOR_SUPERRED,string);
for(new i =0; i < 100; i++)
{
if(PlayerInfo[i][pLeader] == WarWin)
{
SafeGivePlayerMoney(i,WarTopMoney);
format(string,128,"¤Ø³ä´éÃѺà§Ô¹¨Ò¡¡ÒÃÇÍÃì·Ñé§ËÁ´ %d",WarTopMoney);
SendClientMessage(i,COLOR_LIGHTBLUE,string);
}
}
}
forward RemoveATK(gangid);
public RemoveATK(gangid)
{
ATKDelay[gangid] = 0;
}
forward RemoveDef(gangid);
public RemoveDef(gangid)
{
DefDelay[gangid] = 0;
}
stock IsAGangWar(playerid)
{
new l,m;
l = PlayerInfo[playerid][pLeader];
m = PlayerInfo[playerid][pMember];
if((l&m == 5) || (l&m == 6) || (l&m == 12) || (l&m == 13) || (l&m == 14) || (l&m == 15)) // á¡ê§ã¹Ê¤ÃÔ»¢Í§¤Ø³
{
return 1;
}
return 0;
} |
|