16.08.2015, 09:35
PHP код:
if(strcmp(cmd, "/ciordeste", true) == 0)
{
if(PlayerData[playerid][pMember] == 5) || PlayerData[playerid][pLeader] == 5)
{
if(CiorditTimp[playerid] == 0)
{
new victima = GetClosestPlayer(playerid);
if(GetDistanceBetweenPlayers(playerid,victima) < 5)
{
if(PlayerData[victima][pMember] != 5 || PlayerData[victima][pLeader] != 5)
{
new banili = random(1000) + 500;
new nume1[24], nume2[24];
GetPlayerName(playerid, nume1, sizeof(nume1));
GetPlayerName(victima, nume2, sizeof(nume2));
format(string, sizeof(string), "%s ti-a ciordit {228B22}${FFFFFF}%d din buzunar!", nume1, banili);
SendClientMessage(victima, COLOR_WHITE, string);
format(string, sizeof(string), "I-ai ciordit lui %s {228B22}${FFFFFF}%d din buzunar!", nume2, banili);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerCash(playerid, banili);
GivePlayerCash(victima, -banili);
CiorditTimp[playerid] = 1;
SetTimerEx("ciordealatimp", 120000, false, "i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nu iti poti ciordi fratele!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nu e nimeni langa tine!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 2 minute intre ciordiri!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nu faci parte din factiunea Rromi!");
return 1;
}
return 1;
}