SA-MP V.I.P Shop problem
#1

help me

Код:
CMD:cshop2(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Cookies] < 10000) 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)//logged is an example.Replace it with your login variable.
    {
        PlayerInfo[playerid][Vip] = 3;
        PlayerInfo[playerid][Cookies] -= 30000;
        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");
    }
    else SendClientMessage(playerid, -1, "{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 3");
    return 1;
}
if player vip rank low then 3 then he can use /cshop2

if he already level 3 then it must said that he already level 3

but when i make /cshop2 to get V.I.P Level 3

it said i already get level 3 ( i was at vip 2 rank )
Reply
#2

This means if the player is logged and already level 3:
Код:
 if(PlayerInfo[playerid][LoggedIn] == 1 && PlayerInfo[playerid][Vip] == 3)
So the else is when the player isnt level 3: (which is level 2 in your case) thats why you get that message:
Код:
else SendClientMessage(playerid, -1, "{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 3");
FIX: replace the 3 with 2

Код:
if(PlayerInfo[playerid][LoggedIn] == 1 && PlayerInfo[playerid][Vip] == 2)
Reply
#3

Quote:
Originally Posted by RowdyrideR
Посмотреть сообщение
This means if the player is logged and already level 3:
Код:
 if(PlayerInfo[playerid][LoggedIn] == 1 && PlayerInfo[playerid][Vip] == 3)
So the else is when the player isnt level 3: (which is level 2 in your case) thats why you get that message:
Код:
else SendClientMessage(playerid, -1, "{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 3");
FIX: replace the 3 with 2

Код:
if(PlayerInfo[playerid][LoggedIn] == 1 && PlayerInfo[playerid][Vip] == 2)
Worked,Fixed,thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)