#1

I would like to ask, why does not this team? typing / vispeti V_P reason, wrote that throws the text to be warned, and so it is impossible to warn vip member

pawn Код:
CMD:vispeti(playerid,params[])
{
    if(playerDB[playerid][savininkas]==0 || playerDB[playerid][vpriziuretojas]==false) return 0;
    new msg[128],id,zaidejas[MAX_PLAYER_NAME], priezastis[100];
    if(sscanf(params,"us[100]",id, priezastis)) return SendClientMessage(playerid,RED,"* Įspėti V.I.P narį: /vispeti [Vardas_Pavardė] [Priežastis]");
    if(playerDB[id][vip]==false) return SendClientMessage(playerid,RED,"* Žaidėjas nėra V.I.P narys!");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,RED,"* Žaidėjas neprisijungęs!");
    GetPlayerName(id,zaidejas,sizeof(zaidejas));
    format(msg,sizeof(msg),"{FF0000}* Gavote V.I.P įspėjimą! Priežastis: {FFFFFF}%s",priezastis);
    playerDB[id][vispejimai]+=1;
    SendClientMessage(id,Raudona,msg);
    format(msg,sizeof(msg),"* Įspėjote V.I.P: {FFFFFF}%s",zaidejas);
    SendClientMessage(playerid,RED,msg);
    if(playerDB[id][vispejimai]==3)
    {
        playerDB[id][vip]=false;
        playerDB[id][vispejimai]=0;
        SendClientMessage(id,Raudona,"* Jūs surinkote {FFFFFF}3 {00FF00}V.I.P įspėjimus! Todėl netekote vipo!");
        format(msg,sizeof(msg),"* Žaidejas {FFFFFF}%s {FF0000}neteko V.I.P pareigų! Nes surinko 3 įspėjimus!",zaidejas);
        SendClientMessage(playerid,Raudona,msg);
    }
    return 1;
}
Reply
#2

Uped.
Reply
#3

I guess you want that you cannot use this command to VIPs?

By the way, check if the player is valid player first because a runtime error will be caused if the id you typed is invalid.
pawn Код:
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,RED,"* Ћaidėjas neprisijungęs!");
if(playerDB[id][vip]) return SendClientMessage(playerid,RED,"* Ћaidėjas nėra V.I.P narys!");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)