i am getting error ....
#1

CMDetvip(playerid, params[])
PHP код:
{
    new 
giveplayeridmoneys1giveplayer[25], playername[25], string[256], mon;
    if (
adlvl[playerid] < 6) return 0;
    if (
sscanf(params"udd"giveplayeridmoneys1mon)) return SendClientMessage2(playeridCOLOR_WHITE"Usage: /setvip [playerid] [level 1-2] [month]");
    if (!
IsPlayerConnected2(giveplayerid)) return SendClientMessage2(playeridCOLOR_RED"Error: Inactive player id!");
    if (
moneys1 || moneys1 2) return SendClientMessage2(playeridCOLOR_RED"Error: Invalid Vip level.");
    if(
mon || mon 24) return SendClientMessage(playeridCOLOR_RED"Error: Invalid month (0 for lifetime, 24 = 2 years).");
    if (
Logged[giveplayerid] == 0) return SendClientMessage2(playeridCOLOR_WHITE"Error: Player isn't logged in.");
    
GetPlayerName(giveplayeridgiveplayerMAX_PLAYER_NAME);
    if (
adlvl[giveplayerid] >= adlvl[playerid] && adlvl[playerid] < 6) return SendPlayerFormattedText(playeridCOLOR_RED"Error: You cannot Make vip %s"giveplayer"");
    
GetPlayerName(giveplayeridgiveplayerMAX_PLAYER_NAME);
    if (
moneys1 == vipmember[giveplayerid])
    {
        
format(string64"%s is already Vip  L%d."giveplayermoneys1);
        
SendClientMessage2(playeridCOLOR_WHITEstring);
        return 
1;
    }
    
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
    if (
moneys1 != 0)
    {
        
dini_IntSet(AddDirFile(dir_userfilesgiveplayer), "vip"moneys1);
        
dini_IntSet(AddDirFile(dir_datafilesFILE_VIPLIST), giveplayermoneys1);
        
dini_IntSet(AddDirFile(dir_userfilesgiveplayer), "pskin", -1);
    }
    else
    {
        
dini_Unset(AddDirFile(dir_userfilesgiveplayer), "vip");
        
dini_Unset(AddDirFile(dir_userfilesgiveplayer), "pskin");
        
dini_Unset(AddDirFile(dir_datafilesFILE_VIPLIST), giveplayer);
        
dini_Set(AddDirFile(dir_userfilesgiveplayer), "ChatColor""FFFFFF");
        if (
giveplayerid != playerid)
        {
            
SendClientMessage2(giveplayeridCOLOR_WHITE"Your VIP status has been removed.");
            
SendPlayerFormattedText(playeridCOLOR_YELLOW"You have removed %s's VIP status."giveplayer"");
        }
        else 
SendClientMessage2(playeridCOLOR_WHITE"You have removed your VIP status.");
    }
    if(
mon != 0)
    {
        new 
days;
        
days 30 mon;
        
SetVip(giveplayeriddays);
    }
    else {
        
SetVip(giveplayerid0);
    }
    
vipmember[giveplayerid] = moneys1;
    if(
mon != 0) {
        
format(string64"You have been set as Vip L%d for %d month(s)."moneys1mon);
        
SendClientMessage2(giveplayeridCOLOR_YELLOWstring);
        
format(string64"You have set %s as Vip L%d for %d month(s)."giveplayermoneys1mon);
        
SendClientMessage2(playeridCOLOR_YELLOWstring);
    }
    else {
        
format(string64"You have been set as Vip L%d for lifetime"moneys1);
        
SendClientMessage2(giveplayeridCOLOR_YELLOWstring);
        
format(string64"You have set %s as Vip L%d for lifetime."giveplayermoneys1);
        
SendClientMessage2(playeridCOLOR_YELLOWstring);
    }
    if (
moneys1 == 1)
    {
        
GiveRMoney(giveplayeridGetPlayerMoney(giveplayerid)+2500000);
        
ppoints[giveplayerid] += 50;
        if (
giveplayerid != playerid)
        {
            
SendClientMessage2(giveplayeridCOLOR_YELLOW"You have been set as a VIP member Level 1.");
            
SendPlayerFormattedText(playeridCOLOR_YELLOW"You have set %s as a VIP member Level 1."giveplayer"");
        }
        else 
SendClientMessage2(playeridCOLOR_YELLOW"You have set yourself as a VIP member Level 1.");
        return 
1;
    }
    if (
moneys1 == 2)
    {
           
GiveRMoney(giveplayeridGetPlayerMoney(giveplayerid)+5000000);
           
ppoints[giveplayerid] += 100;
        if (
giveplayerid != playerid)
        {
            
SendClientMessage2(giveplayeridCOLOR_YELLOW"You have been set as a VIP member Level 2.");                SendPlayerFormattedText(playeridCOLOR_YELLOW"You have set %s as a VIP member Level 2."giveplayer"");
        }
        else 
SendClientMessage2(playeridCOLOR_YELLOW"You have set yourself as a VIP member Level 2.");
        return 
1;
        }
    return 
1;

Its giving me error undifined symbol "GiveRMoney"
Reply
#2

Replace givermoney with GivePlayerMoney.
Reply
#3

Thanks..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)