21.02.2016, 06:05
Код:
C:\Users\TheDarkBlade\Desktop\xMA.pwn(42646) : error 033: array must be indexed (variable "winner") C:\Users\TheDarkBlade\Desktop\xMA.pwn(42648) : warning 202: number of arguments does not match definition C:\Users\TheDarkBlade\Desktop\xMA.pwn(42649) : error 029: invalid expression, assumed zero C:\Users\TheDarkBlade\Desktop\xMA.pwn(42649) : error 017: undefined symbol "prize" C:\Users\TheDarkBlade\Desktop\xMA.pwn(42649) : error 029: invalid expression, assumed zero C:\Users\TheDarkBlade\Desktop\xMA.pwn(42649) : fatal error 107: too many error messages on one line
PHP код:
CMD:dmwinner(playerid,params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Logheazate mai intai");
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
new winner[50];
if(sscanf(params, "u",winner)) return SendClientMessage(playerid, COLOR_WHITE, "{B8DBFF}Synthax: /dmwinner <Name/Playerid>");
if(winner != INVALID_PLAYER_ID) ///46246
{
SendClientMessageToAll(COLOR_GREEN,"%s a castigat eventul DM! Felicitari",winner); // 46248
GivePlayerCash(playerid, + prize);
activeevent = 0;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Acel player nu este conectat");
}
}
else
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Nu ai nivelul de admin necesar");
}
}
return 1;
}
PHP код:
CMD:startdmevent(playerid,params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Logheazate mai intai");
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >=3)
{
new prize;
if(sscanf(params, "d",prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Comanda: /startdmevent <premiu> ");
else if (prize<1 || prize>500000) return SendClientMessage(playerid,COLOR_YELLOW,"Premiul trebuie sa fie intre 1 si 500k");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Deja exista un event in derulare.");
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
SendClientMessageToAll(COLOR_YELLOW2,"Adminul %s a pornit DM event!",aname);
SendClientMessageToAll(COLOR_YELLOW2,"Premiu : $%s",prize);
SendClientMessageToAll(COLOR_YELLOW,"Pentru a participa scrie /joinevent");
Count = 0;
activeevent = 1;
}
else
{
SendClientMessage(playerid,COLOR_LIGHTRED,"Nu ai nivelul de admin necesar");
}
}
return 1;
}