How to call a function? (+Rep for help)
#6

pawn Код:
forward EndAntiSpawnKill(playerid);
public EndAntiSpawnKill(playerid)
{
        format(Vnewban,32,BanDir,VBPlayer(playerid));
        VBanLoadInfo(playerid,Vnewban);
        new name[MAX_PLAYER_NAME+1];
        GetPlayerName(playerid, name, sizeof(name));
        new string[264];
        new ip[16];
        GetPlayerIp(playerid, ip, sizeof(ip));
        format(string, sizeof(string), "%s [ID: %d] [IP: %s] is suspected of ban evading. (Old Name: %s)", name, playerid, ip, dini_Get(Vnewban,"Nick")); //I want it to show up the old name
        MessageToAdmins(0xFD01FDAA,string);
        printf(string);
        VBanLoadInfo(playerid);//notice I changed it to just playerid
       
}
Some things are wrong in the stock as well...
pawn Код:
stock VBanLoadInfo(Varq) //Varq is the id of the player
{
    if(!dini_Exists(Varq))
    return MessageToAdmins(red, "No Banned Found!");//changed to adminmessage

    new Str[300];
    new Str1[300];
    new Str2[300];
    new Str3[300];
    new Str4[300];
    new Str5[300];
    format(Str,300,"Nickname: %s",dini_Get(Varq,"Nick")); //get this on top
    format(Str1,300,"IP: %s",dini_Get(Varq,"IP"));
    format(Str2,300,"Admin: %s",dini_Get(Varq,"Admin"));
    format(Str3,300,"Reason: %s",dini_Get(Varq,"Reason"));
    format(Str4,300,"Date: %s",dini_Get(Varq,"Date"));
    format(Str5,300,"Hour: %s",dini_Get(Varq,"Hour"));

    MessageToAdmins(red,Str);
    MessageToAdmins(red,Str1);
    MessageToAdmins(red,Str2);
    MessageToAdmins(red,Str3);
    MessageToAdmins(red,Str4);
    MessageToAdmins(red,Str5);
    return 1;
}
try that
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)