12.07.2018, 13:57
Hey guys im looking in a tutorial to create factions and i got a problem cna u help me please?
Код HTML:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2541) : error 047: array sizes do not match, or destination array is too small C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2544) : error 047: array sizes do not match, or destination array is too small C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2546) : error 047: array sizes do not match, or destination array is too small C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2553) : error 017: undefined symbol "RemoveName" C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(2555) : error 017: undefined symbol "RemoveName" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
PHP код:
CMD:makeleader(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] > 6)
{
if(!sscanf(params, "di", params[0], params[1]))
{
new ftext[30];
if(params[1] < 0 || params[1] > MAX_FACTIONS) return SendClientMessage(playerid, COLOR_GREEN, "{48CFD7}» {FFFFFF}ID Faction incorrect.");
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, COLOR_GREEN, "{48CFD7}» {FFFFFF}Played offline.");
switch(params[1])
{
case 0: {PlayerInfo[params[0]][pFaction] = 0; ftext = "Remove Leader Status"; }
case 1: {PlayerInfo[params[0]][pFaction] = 6; ftext = "San Andreas Police Department"; }
case 2: {PlayerInfo[params[0]][pFaction] = 6; ftext = "Federal Bureau of Investigation"; }
case 3: {PlayerInfo[params[0]][pFaction] = 6; ftext = "National Guards"; }
case 4: {PlayerInfo[params[0]][pFaction] = 6; ftext = "San Andreas Government"; }
case 5: {PlayerInfo[params[0]][pFaction] = 6; ftext = "San Andreas Medical & Fire Department"; }
case 6: {PlayerInfo[params[0]][pFaction] = 6; ftext = "San Andreas News"; }
case 7: {PlayerInfo[params[0]][pFaction] = 6; ftext = "San Andreas Medical & Fire Department"; }
case 8: {PlayerInfo[params[0]][pFaction] = 6; ftext = "San Andreas Taxi Company"; }
case 9: {PlayerInfo[params[0]][pFaction] = 6; ftext = "Hitmen Agency"; }
}
new string[128];
PlayerInfo[params[0]][pLeader] = params[1];
PlayerInfo[params[0]][pMember] = params[1];
format(string, sizeof(string), "{48CFD7}»{FFFFFF} %s you assigned the faction leader %s.", RemoveName(playerid), ftext);
SendClientMessage(params[0], 0x6ADFFFFF, string);
format(string, sizeof(string), "{48CFD7}»{FFFFFF} %s assigned leader of the faction %s a %s.", RemoveName(playerid), ftext, RemoveName(params[0]));
ABroadCast(COLOR_RED, string, 3);
}
else SendClientMessage(playerid, COLOR_WHITE, "{48CFD7}» {FFFFFF}Use: /makeleader [player] [faction]");
}
else SendClientMessage(playerid, COLOR_CORRECTION, "You're not autorized");
return 1;
}