23.09.2017, 14:13
PHP код:
COMMAND:cbuyvip(playerid, params[])
{
if(!playerData[playerid][playerLoggedIn]) return SendClientMessage(playerid, -1, "You are not logged in yet to use any commands");
if(playerData[playerid][cookies] < 500) return SendClientMessage(playerid, -1, "You need to have more than 500 cookies to buy VIP");
new
message2[128];
playerData[playerid][cookies] = playerData[playerid][cookies] -500;
playerData[playerid][playerVIPLevel] = 1;
playerData[playerid][vipExpires] = gettime() + 2592000;
playerGiveMoney(playerid, 500000);
playerGiveXP(playerid, 500);
format(message2, sizeof(message2), "{B7B7B7}[INFO] {FFFFFF}You have bought Standard VIP");
SendClientMessage(playerid, COLOR_WHITE, message2);
disableAchieve(playerid);
PlayerTextDrawShow(playerid, playerData[playerid][Achieve1]);
PlayerTextDrawShow(playerid, playerData[playerid][Achieve2]);
PlayerTextDrawShow(playerid, playerData[playerid][Achieve3]);
PlayerTextDrawShow(playerid, playerData[playerid][Achieve4]);
PlayerTextDrawSetString(playerid, playerData[playerid][Achieve3], "You're VIP!");
PlayerTextDrawSetString(playerid, playerData[playerid][Achieve4], "You are now a VIP member, nice!");
PlayerPlaySound(playerid, 1185 ,0.0, 0.0, 0.0);
playerData[playerid][achieveTimer] = SetTimerEx("disableAchieve", 6000, false, "i", playerid);
playerGiveXP(playerid, 25);
playerData[playerid][playerScore] = playerData[playerid][playerScore] + 2;
SetPlayerScore(playerid, playerData[playerid][playerScore]);
return 1;
}