2 errors.
#8

Quote:
Originally Posted by Lacamora
Посмотреть сообщение
PHP код:
PlayerInfo[targetid][pBanned] = 1;
    
PlayerInfo[targetid][pBannedBy] = pName// error 1
    
PlayerInfo[targetid][pBannedFor] = reason//error 2 
change to

PHP код:
PlayerInfo[targetid][pBanned] = 1;
new 
text1[50],text[40];
format(text1,sizeof(text1), " %s.",pName);
PlayerInfo[targetid][pBannedBy] = text1;
format(text,sizeof(text), " %s.",reason);
PlayerInfo[targetid][pBannedBy] = text
PS : sorry for double post
Im getting the same errors with your code .
Anyways here's the full code
pawn Код:
CMD:ban(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 1) return NOACCESS
    new targetid, reason[128];
    if(sscanf(params, "us[30]", targetid, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [id] [reason]");
    if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "The player is not connected.");
    new pName[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], day, month, year, hour, minute, second, string[150];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    GetPlayerName(playerid,targetname,MAX_PLAYER_NAME);
    getdate(day, month, year);
    gettime(hour, minute, second);
    format(string, sizeof(string), "[{FF0000}BAN{EEEEEE}]Administrator %s has banned %s for %s",pName,targetname,reason);
    SendClientMessageToAll(COLOR_WHITE,string);
    format(string, sizeof(string),"[{FF0000}BAN{EEEEEE}]Administrator %s has banned you for %s",pName,reason);
    SendClientMessage(targetid,COLOR_WHITE,string);
    SendClientMessage(targetid,COLOR_WHITE,"--------------------------------------");
    SendClientMessage(targetid, COLOR_RED, "Ban Information");
    format(string, sizeof(string), "Banned by: %s", pName);
    SendClientMessage(targetid, COLOR_RED, string);
    format(string, sizeof(string), "Banned for: %s", reason);
    SendClientMessage(targetid, COLOR_RED, string);
    format(string, sizeof(string), "Ban date: %d/%d/%d at %d:%d:%d.", day, month, year, hour, minute, second);
    SendClientMessage(targetid, COLOR_RED, string);
    SendClientMessage(targetid, COLOR_WHITE,"Please press the F8 button to take a screenshot to use it on your appeal");
    SendClientMessage(targetid,COLOR_WHITE,"--------------------------------------");
    PlayerInfo[targetid][pBanned] = 1;
//    PlayerInfp[targetid][pBannedBy] = pName; // error lines
//    PlayerInfo[targetid][pBannedFor] = reason; // error lines
    SetTimerEx("BanPlayer", 200, false, "i", targetid);
    return 1;
}
Reply


Messages In This Thread
2 errors. - by Johnson_Brooks - 28.05.2014, 09:07
Re: 2 errors. - by Konstantinos - 28.05.2014, 09:18
Re: 2 errors. - by Rittik - 28.05.2014, 09:19
Re: 2 errors. - by Johnson_Brooks - 28.05.2014, 09:34
Re: 2 errors. - by Konstantinos - 28.05.2014, 09:43
Re: 2 errors. - by Lacamora - 28.05.2014, 10:23
Re: 2 errors. - by Lacamora - 28.05.2014, 10:32
Re: 2 errors. - by Johnson_Brooks - 28.05.2014, 11:49
Re: 2 errors. - by Konstantinos - 28.05.2014, 15:06
Re: 2 errors. - by Johnson_Brooks - 28.05.2014, 18:51

Forum Jump:


Users browsing this thread: 2 Guest(s)