11.01.2018, 08:30
Quote:
0 should be none i guess? so if the player doesnt have that vip rank it'll give him, if he does then it wont, i dont know what's the problem with you acting like pro around here but i tried to help.
|
Код:
if(dialogid == DIALOG_VSHOP) // Misc { if(response) { if(listitem == 0) { if(PlayerInfo[playerid][Cookies] < 2500) return SendClientMessage(playerid, -1, "{FF0000}ERROR : You dont have enough cookies to be V.I.P 1!"); if(PlayerInfo[playerid][LoggedIn] == 1 && PlayerInfo[playerid][Vip] == 0)//logged is an example.Replace it with your login variable. { PlayerInfo[playerid][Vip] = 1; PlayerInfo[playerid][Cookies] -= 2500; GameTextForPlayer(playerid,"Vip Promoted", 2000, 3); SendClientMessage(playerid, -1, "{00FF40}You have received {FF0000}V.I.P {00FF40}Status 1"); SendClientMessage(playerid, -1, "{00FF40}Use /vcmds or /vcmd1 to see {FF0000}/VIPS {00FF40}Commands"); SavePlayer(playerid); } else SendClientMessage(playerid, -1, "{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 1"); } if(listitem == 1) { if(PlayerInfo[playerid][Cookies] < 5000) return SendClientMessage(playerid, -1, "{FF0000}ERROR : You dont have enough cookies to be V.I.P 2!"); if(PlayerInfo[playerid][LoggedIn] == 1 && PlayerInfo[playerid][Vip] <= 1) { PlayerInfo[playerid][Vip] = 2; PlayerInfo[playerid][Cookies] -= 5000; GameTextForPlayer(playerid,"Vip Promoted", 2000, 3); SendClientMessage(playerid, -1, "{00FF40}You have received {FF0000}V.I.P {00FF40}Status 2"); SendClientMessage(playerid, -1, "{00FF40}Use /vcmds or /vcmd1 to see {FF0000}/VIPS {00FF40}Commands"); SavePlayer(playerid); } else SendClientMessage(playerid, -1, "{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 2"); } if(listitem == 2) { if(PlayerInfo[playerid][Cookies] < 7500) return SendClientMessage(playerid, -1, "{FF0000}ERROR : You dont have enough cookies to be V.I.P 3!"); if(PlayerInfo[playerid][LoggedIn] == 1 && PlayerInfo[playerid][Vip] != 3) { PlayerInfo[playerid][Vip] = 3; PlayerInfo[playerid][Cookies] -= 7500; GameTextForPlayer(playerid,"Vip Promoted", 2000, 3); SendClientMessage(playerid, -1, "{00FF40}You have received {FF0000}V.I.P {00FF40}Status 3"); SendClientMessage(playerid, -1, "{00FF40}Use /vcmds or /vcmd1 to see {FF0000}/VIPS {00FF40}Commands"); SavePlayer(playerid); } else SendClientMessage(playerid, -1, "{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 3"); } } return 1; }
i tried 3 method
btw,thanks Alex and iLearner