24.06.2019, 19:03
Helo, i make a bonus command and is work very good. One problem, when i enter again in game i have level 1 and again i can use /bonus.
HOW TO FIX TO SAVE LEVEL WHEN EXIT
HOW TO FIX TO SAVE LEVEL WHEN EXIT
PHP Code:
CMD:bonus(playerid)
{
if(PlayerInfo[playerid][pLevel] == 1 || GetPlayerScore(playerid) == 1)
{
SendClientMessage(playerid,-1,"Deoarece ai folosit comanda /bonus ai primit:");
SendClientMessage(playerid,-1,"-LEVEL: 3");
SendClientMessage(playerid,-1,"-MONEY: $5.000.000");
GivePlayerMoney(playerid,5000000);
PlayerInfo[playerid][pLevel] = SetPlayerScore(playerid,3);
}
else
{
SendClientMessage(playerid,-1,"Trebuie sa ai minim level 1 pentru a folosi aceasta comanda.");
}
return 1;
}