05.04.2012, 02:03
How do I do that the system will notify that the battle between the two competitors ended and notify the winner and who
Losing?
(sorry for bad Eng.)
This is the Code:
Losing?
(sorry for bad Eng.)
This is the Code:
PHP код:
if(strcmp(cmd, "/Sbattle", true) == 0)
{
new pName[24];
GetPlayerName(playerid, pName, 24);
if(!strcmp(pName, "[iNo]Zip[z]Op[H]", true)
|| !strcmp(pName, "[iNo]Shap[H]", true))
{
if(!IsPlayerXAdmin(playerid))return 0;
new first[256],second[256],name[24],name2[24],King[256];
first = strtok(cmdtext, idx);
if(!strlen(first))return SendClientMessage(playerid,COLOR_WHITE,"/Sbattle [Id / Name] [Id / Name]- щйоещ");
second = strtok(cmdtext, idx);
if(!strlen(second))return SendClientMessage(playerid,COLOR_WHITE,"/Sbattle [Id / Name] [Id / Name] - щйоещ");
id = ReturnUser(first);
new id2 = ReturnUser(second);
if(!IsPlayerConnected(id) ||!IsPlayerConnected(id2) || id == id2)return SendClientMessage(playerid,COLOR_WHITE,".азг ае щрй дощъъфйн айрн озебшйн");
for(new i; i < MAX_PLAYERS; i++)if(IsPlayerConnected(i))InBattle[i] = 0;
GetPlayerName(id,name,24);
GetPlayerName(id2,name2,24);
SendClientMessageToAll(COLOR_WHITE,"~~~~~~~~~ Sawn Battle ~~~~~~~~~");
format(King,256,"{FFFFFF}%s {16EB43}- {FFFFFF}%s {16EB43} Lats Rock !",name,name2);
SendClientMessageToAll(green,King);
SendClientMessageToAll(COLOR_WHITE,"~~~~~~~~~ Sawn Battle ~~~~~~~~~");
InBattle[id] = true,InBattle[id2] = true;
SetPlayerPosEx(id,1973.8173,2335.5640,23.8516,180);
SetPlayerPosEx(id2,1972.7924,2380.4998,23.8469,359.9);
ResetPlayerWeapons(id),ResetPlayerWeapons(id2);
SetPlayerHealth(id,100),SetPlayerHealth(id2,100);
SetPlayerArmour(id,100),SetPlayerArmour(id2,100);
LACY_GiveWeapon(id,26,9999),LACY_GiveWeapon(id2,26,9999);
TogglePlayerControllable(id,0),TogglePlayerControllable(id2,0);
BattleCd(10);
}
else
SendClientMessage(playerid, 0xFfff00f, "Not Access For You !");
return 1;
}