Donator class rep++
#1

how to add team donator only for donators/vips

if(pInfo[playerid][Donator] == 1 && pInfo[playerid][Donator] == 0)
{
SendClientMessage(playerid, RED, "You need to be vip for donator team");
return 0;
}
return 1;
}



this team
Код:
              case 12:
                    {
              	GameTextForPlayer(playerid,"~w~VIP ONLY",1000,6);
                SetPlayerColor(playerid, C_COLOR);
                gTeam[playerid] = C1;
                SetPlayerPos(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerCameraPos(playerid,-279.0844,2660.7461,62.6090);
                SetPlayerCameraLookAt(playerid,-285.0289,2661.6575,62.6531);
                SetPlayerFacingAngle(playerid,271.5169);
            }
    }
Reply
#2

You are checking if donator is equal 1 but also if its equal to 0.

Use:
Код:
if(pInfo[playerid][Donator] == 0)
{
SendClientMessage(playerid, RED, "You need to be vip for donator team");
return 0;
}
return 1;
}
Reply
#3

Quote:
Originally Posted by arjanforgames
Посмотреть сообщение
You are checking if donator is equal 1 but also if its equal to 0.

Use:
Код:
if(pInfo[playerid][Donator] == 0)
{
SendClientMessage(playerid, RED, "You need to be vip for donator team");
return 0;
}
return 1;
}
Arjanforgames is right, you are saying that donators and non donators cannot use this class so the code above should work for you.

My pre-custom made code for you.

Код:
if(PlayerInfo[playerid][Donator] == 0) // Or: if(pInfo[playerid][Donator] == 0)
{
SendClientMessage(playerid, COLOR_RED, "You need to be a V.I.P to be eligible for the donator team!");
return 0;
}
return 1;
}
Reply
#4

Why make a new code containing PlayerInfo and COLOR_RED when he's using pInfo and RED?
Just do what arjanforgames said.
Reply
#5

Well, some people may wan't to use it and might see this post and might see my code, so they could use it for future reference, and plus, I did do // Or ....

EDIT: Plus, I'm trying to help, at least i'm trying to do something instead of sitting on my ass and doing nothing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)