CMD:bonus(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(IsPlayerConnected(playerid))
{
if(BonusActiv > 0)
{
if(PlayerInfo[playerid][pLevel] < 3)
{
new ip[16],query[500];
GetPlayerIp(playerid, ip, sizeof(ip));
format(query, sizeof(query), "SELECT * FROM `users` WHERE `LastIP` = '%s' AND `Level` >= '3'", ip);
new Cache: stringresult = mysql_query(SQL, query);
if(cache_get_row_count () > 0)
{
SendClientMessage(playerid, COLOR_GREY, "You used this command an another account.");
return 1;
}
cache_delete(stringresult);
PlayerInfo[playerid][pOcase] += 5;
Update(playerid,pOcasex);
PlayerInfo[playerid][pOkey] += 5;
Update(playerid,pOkeyx);
GivePlayerCash(playerid, 25000000);
PlayerInfo[playerid][pLevel] = 3;
Update(playerid, pLevelx);
Update(playerid, pCashx);
PlayerInfo[playerid][pPremiumPoints] += 100;
Update(playerid,pPremiumPointsx);
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit $25.000.000, level 3, 100 Puncte Premium, 5 key si 5 case de inceput!");
}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
}
}
return 1;
}