[HELP ]CMD
#1

pawn Код:
CMD:setprem(playerid,params[])
{
    if(PlayerInfo[playerid][AdminLevel] < 5) return SendClientMessage(playerid,YELLOW,"» Error:You must be an administrator to use this command");
    static id,prem;
    if(sscanf(params,"ui",id,prem)) return SendClientMessage(playerid,YELLOW,"USAGE:/setprem <id> <premium> 1 = Gold | 2 = Platinium");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,YELLOW,"» Error: That player isn't connected!");
    if(prem > 2 && prem < 0) return SendClientMessage(playerid,YELLOW,"Maximum premium level is 2!");
    if(prem == 1)
    {
        SendClientMessage(id,"» Administrator %d has setted youre VIP to Gold",playerid);
    }
    else
    {
        SendClientMessage(id,"» Administrator %d has setted youre VIP to  None.",playerid);
        SetPlayerArmour(id,0);
    }
    PlayerInfo[id][Pvip] = prem;
    return 1;
}
help me i get this errors

pawn Код:
error 035: argument type mismatch (argument 2)
error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

pawn Код:
CMD:setprem(playerid,params[])
{
    if(PlayerInfo[playerid][AdminLevel] < 5) return SendClientMessage(playerid,YELLOW,"» Error:You must be an administrator to use this command");
    static id,prem;
    new string[128];
    if(sscanf(params,"ui",id,prem)) return SendClientMessage(playerid,YELLOW,"USAGE:/setprem <id> <premium> 1 = Gold | 2 = Platinium");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,YELLOW,"» Error: That player isn't connected!");
    if(prem > 2 && prem < 0) return SendClientMessage(playerid,YELLOW,"Maximum premium level is 2!");
    if(prem == 1)
    {
        format(string, 128, "» Administrator %d has setted youre VIP to Gold", playerid);
        SendClientMessage(id,-1,string);
    }
    else
    {
        format(string, 128, "» Administrator %d has setted youre VIP to Gold", playerid);
        SendClientMessage(id,-1,string);
    }
    PlayerInfo[id][Pvip] = prem;
    return 1;
}
Try this.
Reply
#3

works thanx <3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)