- เครดิต
- 155
- ความรู้
-
- เงิน $
-
- ความดี
-
|
new gid;
if(PlayerInfo[playerid][pLeader] != 0) gid = PlayerInfo[playerid][pLeader];
if(PlayerInfo[playerid][pMember] != 0) gid = PlayerInfo[playerid][pMember];
if(strcmp(cmd,"/open") == 0)
{
if(PlayerInfo[playerid][pAdmin] > 3)
{
WarOn = 1;
SendClientMessageToAll(COLOR_SUPERRED,"»ÃСÒÈ : Gang War ªÔ§àʺÕ§ä´éàÃÔèÁ¢Öé¹áÅéÇ !! ¢ÍãËé·Ø¡á¡ê§ÁØè§Ë¹éÒ¨Ùèâ¨ÁºéÒ¹à»éÒËÁÒÂä´é");
OnWarStart();
return 1;
}
return 1;
}
if(strcmp(cmd,"/close") == 0)
{
if(PlayerInfo[playerid][pAdmin] > 3)
{
WarOn = 0;
SendClientMessageToAll(COLOR_SUPERRED,"»ÃСÒÈ : Gang War ªÔ§àʺÕ§ä´é¨ºÅ§áÅéÇ");
OnWarEnd();
return 1;
}
return 1;
}
if(strcmp(cmd, "/atk", true) == 0)
{
if(WarOn == 1)
{
new doorid;
if(CanWar[gid] == 1)
{
new gtext[30],gidtext[30];
if(PlayerInfo[playerid][pLeader] > 0 && IsAMember(playerid))
{
if(PlayerToPoint(5.0, playerid,-2454.8596,-135.8240,26.1772)) { doorid = 12; }// ¾Ô¡Ñ´¨Ø´µÕ»Ãе٢ͧá¡ê§·Õè12
else if(PlayerToPoint(5.0, playerid,-2579.4365,310.0659,5.1797)) { doorid = 13; }// ¾Ô¡Ñ´¨Ø´µÕ»Ãе٢ͧá¡ê§·Õè13
else if(PlayerToPoint(5.0, playerid,-1862.1824,-145.7641,11.8984)) { doorid = 14; }// ¾Ô¡Ñ´¨Ø´µÕ»Ãе٢ͧá¡ê§·Õè14
else if(PlayerToPoint(5.0, playerid,-1939.6660,1227.4609,31.6424)) { doorid = 15; }// ¾Ô¡Ñ´¨Ø´µÕ»Ãе٢ͧá¡ê§·Õè 15
else if(PlayerToPoint(5.0, playerid,-2719.4019,-319.1833,7.8438)) { doorid = 5; }// ¾Ô¡Ñ´¨Ø´µÕ»Ãе٢ͧá¡ê§·Õè 5
else if(PlayerToPoint(5.0, playerid,-2192.6519,647.4236,49.4375)) { doorid = 6; }// ¾Ô¡Ñ´¨Ø´µÕ»Ãе٢ͧá¡ê§·Õè 6
else if(PlayerToPoint(5.0, playerid,-2719.4019,-319.1833,7.8438)) { doorid = 8; }// ¾Ô¡Ñ´¨Ø´µÕ»Ãе٢ͧá¡ê§·Õè 8
else { doorid = 0; }
if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) { gidtext = "ÁÒà¿ÕÂ"; }
else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) { gidtext = "ÂÒ¡Ø«èÒ"; }
else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) { gidtext = "¹Ñ¡ÅèÒ¤èÒËÑÇ"; }
else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) { gidtext = "á¡ê§¤ìà¢ÕÂÇ"; }
else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) { gidtext = "á¡ê§¤ìÁèǧ"; }
else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) { gidtext = "á¡ê§¤ìàËÅ×ͧ"; }
else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) { gidtext = "á¡ê§¤ì¿éÒ"; }
if(doorid == 5) { gtext = "ÁÒà¿ÕÂ"; }
else if(doorid == 6) { gtext = "ÂÒ¡Ø«èÒ"; }
else if(doorid == 8) { gtext = "¹Ñ¡ÅèÒ¤èÒËÑÇ"; }
else if(doorid == 12) { gtext = "á¡ê§¤ìà¢ÕÂÇ"; }
else if(doorid == 13) { gtext = "á¡ê§¤ìÁèǧ"; }
else if(doorid == 14) { gtext = "á¡ê§¤ìàËÅ×ͧ"; }
else if(doorid == 15) { gtext = "á¡ê§¤ì¿éÒ"; }
printf("doorid %d",doorid);
if(doorid != gid && doorid != 0)
{
if(gDoor[doorid] > 0)
{
if(ATKDelay[gid] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"¤Ø³à¾Ô觵ջÃеÙ仡ÃسÒÃÍ");
return 1;
}
gDoor[doorid] -= 1;
ATKDelay[gid] = 1;
format(string,256,"%s ä´éµÕ»Ãе٢ͧá¡ê§ %s (¾ÅѧàËÅ×Í %d/10)",gidtext,gtext,gDoor[doorid]);
SendClientMessageToAll(COLOR_SUPERRED,string);
SetTimerEx("RemoveATK",15000,0,"i",gid);
if(gDoor[doorid] == 0)
{
format(string,256,"»Ãе٢ͧá¡ê§ %s ä´é¾Ñ§·ÅÒÂáÅéÇ",gtext);
SendClientMessageToAll(COLOR_SUPERRED,string);
}
return 1;
}
else return SendClientMessage(playerid,COLOR_GREY,"»ÃеÙá¡ê§¹Õé¾Ñ§Å§áÅéÇ");
}
else return SendClientMessage(playerid,COLOR_GREY,"äÁèÊÒÁÒöµÕ»ÃеÙä´é");
}
else return SendClientMessage(playerid,COLOR_GREY,"¤Ø³µéͧà»ç¹ËÑÇ˹éÒá¡ê§à·èÒ¹Ñé¹");
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"ÂѧäÁè¶Ö§àÇÅÒÇÍÃì");
return 1;
}
return 1;
}
if(strcmp(cmd, "/def", true) == 0)
{
if(PlayerInfo[playerid][pLeader] != 0)
{
if(gDoor[gid] == 10)
{
SendClientMessage(playerid,COLOR_YELLOW,"»ÃеÙá¡ê§¢Í§¤Ø³¾Åѧ»éͧ¡Ñ¹àµçÁáÅéÇ");
return 1;
}
if(DefDelay[gid] == 1)
{
SendClientMessage(playerid,COLOR_GREY,"¡ÃسÒÃÍ ´ÕàÅÂì㹡Òûéͧ¡Ñ¹ 15 ÇÔ");
return 1;
}
gDoor[gid] += 1;
DefDelay[gid] = 1;
format(string,128,"¾Åѧ»éͧ¡Ñ¹»Ãе٢ͧá¡ê§¤Ø³à¾ÔèÁ¢Öé¹ 1 (¾Åѧ·Ñé§ËÁ´ %d/10)",gDoor[gid]);
SendRadioMessage(gid,COLOR_YELLOW,string);
SetTimerEx("RemoveDef",15000,0,"d",gid);
}
else return SendClientMessage(playerid,COLOR_GREY,"ÊÓËÃѺËÑÇ˹éÒá¡ê§à·èÒ¹Ñé¹");
} |
|