23.09.2017, 13:56
I made a command to buy vip for cookies,
here is the code:-
Code:
But it is giving error on this line:-
Code:-
Plz anyone help, +rep if suceed
here is the code:-
Code:
Код:
COMMAND:cbuyvip(playerid, params[]) { if(playerData[playerid][playerLoggedIn]) { if(playerData[playerid][cookies] >=500) { new message2[128] ; else { 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; }
Code:-
Код:
else