VIP help
#10

Quote:
Originally Posted by tanush
Посмотреть сообщение
ok this is mine, dont copy mine just take an this idea and make your own
pawn Код:
CMD:setvip(playerid, params[])
{
    new id,vlevel,file[256];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"SERVER: Unknown command.");
    if(sscanf(params,"ui",id,vlevel)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /setvip [id] [Level 1-3]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF, "That user is not connected.");
    if(vlevel > 3) return SendClientMessage(playerid,0xFF0000FF,"AVAILABLE VIP LEVELS 1-3!");
    if(vlevel == 0)
    {
        if(PlayerData[id][vip] == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 0 vip!");
        GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
        GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
        format(String, sizeof(String),"%s has set your VIP Level to 0!",Name);
        SendClientMessage(id,0xFF9900AA,String);
        format(String,sizeof(String),"You had set %s VIP Level to 0!",pname);
        SendClientMessage(playerid,0xFF9900AA,String);
        dini_IntSet(file,"VIP", 0);
        PlayerData[id][vip] = 0;
        PlayerData[playerid][vip] = 0;
        PlayerData[id][vip] = 0;
    }
    if(vlevel == 1)
    {
        if(PlayerData[id][vip] == 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 1 vip!");
        GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
        GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
        format(String, sizeof(String),"%s has set your VIP Level to 1 (BRONZE VIP)!",Name);
        SendClientMessage(id,0xFF9900AA,String);
        format(String, sizeof(String),"You had set %s VIP Level to 1 (BRONZE VIP)!",pname);
        SendClientMessage(playerid,0xFF9900AA,String);
        dini_IntSet(file,"VIP", 1);
        PlayerData[id][vip] = 1;
        PlayerData[playerid][vip] = 1;
        PlayerData[id][vip] = 1;
    }
    if(vlevel == 2)
    {
        if(PlayerData[id][vip] == 2) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 2 vip!");
        GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
        GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
        format(String, sizeof(String),"%s has set your VIP Level to 2 (SILVER VIP)!",Name);
        SendClientMessage(id,0xFF9900AA,String);
        format(String, sizeof(String),"You had set %s VIP Level to 2 (SILVER VIP)!",pname);
        SendClientMessage(playerid,0xFF9900AA,String);
        dini_IntSet(file,"VIP", 2);
        PlayerData[id][vip] = 2;
        PlayerData[playerid][vip] = 2;
        PlayerData[id][vip] = 2;
    }
    if(vlevel == 3)
    {
        if(PlayerData[id][vip] == 3) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 3 vip!");
        GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
        GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
        format(String, sizeof(String),"%s has set your VIP Level to 3 (GOLD VIP)!",Name);
        SendClientMessage(id,0xFF9900AA,String);
        format(String, sizeof(String),"You had set %s VIP Level to 3 (GOLD VIP)!",pname);
        SendClientMessage(playerid,0xFF9900AA,String);
        dini_IntSet(file,"VIP", 3);
        PlayerData[id][vip] = 3;
        PlayerData[playerid][vip] = 3;
        PlayerData[id][vip] = 3;
    }
    return 1;
}
this script give me those errors:
Код:
C:\Documents and Settings\galina\щемзп дтбегд\Gta Files\filterscripts\VIP.pwn(94) : error 029: invalid expression, assumed zero
C:\Documents and Settings\galina\щемзп дтбегд\Gta Files\filterscripts\VIP.pwn(94) : error 017: undefined symbol "cmd_setvip"
C:\Documents and Settings\galina\щемзп дтбегд\Gta Files\filterscripts\VIP.pwn(94) : error 029: invalid expression, assumed zero
C:\Documents and Settings\galina\щемзп дтбегд\Gta Files\filterscripts\VIP.pwn(94) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
(line 94:CMDetvip(playerid, params[]))
Reply


Messages In This Thread
VIP help - by [ProX]BlueFire - 21.03.2011, 10:14
Re: VIP help - by Markx - 21.03.2011, 18:42
Re: VIP help - by Cristiano[TW[ - 22.03.2011, 13:05
Re: VIP help - by aircombat - 22.03.2011, 13:46
Re: VIP help - by Davz*|*Criss - 22.03.2011, 20:16
Re: VIP help - by tanush - 22.03.2011, 21:11
Re: VIP help - by Davz*|*Criss - 22.03.2011, 21:20
Re: VIP help - by tanush - 22.03.2011, 21:24
Re: VIP help - by Davz*|*Criss - 22.03.2011, 21:30
Re: VIP help - by [ProX]BlueFire - 24.03.2011, 21:00

Forum Jump:


Users browsing this thread: 1 Guest(s)