12.03.2011, 19:56
Why do you add this:
That's not needed like I said. That function I said whas the complete function. Do NOT add it in a command or something. Here's an example gamemode:
pawn Код:
{
if(IsPlayerConnected(playerid))
{
{
return 1;
}
}
return 0;
pawn Код:
#include <a_samp>
#include <zcmd>
enum pInfo
{
pDonateRank
};
new PlayerInfo[MAX_PLAYERS][pInfo];
main()
return 1;
public OnGameModeInit()
return 1;
stock IsAVip(playerid, reqlvl = 1)
return PlayerInfo[playerid][pDonateRank] >= reqlvl ? true : false;
CMD:vip(playerid, params[])
{
if(IsAVip(playerid))
SendClientMessage(playerid, 0xFFFFFFAA, "You are a VIP!");
else if(IsAVip(playerid, 2))
SendClientMessage(playerid, 0x00FF00AA, "You are a VIP level 2!");
else if(IsAVip(playerid, 3))
SendClientMessage(playerid, 0x00FF00AA, "** You are a VIP level 3!");
if(!IsAVip(playerid))
SendClientMessage(playerid, 0xFF0000AA, "You are not a VIP");
return 1;
}