09.02.2017, 19:45
Код HTML:
[22:27:08] [debug] Server crashed while executing gmi.amx [22:27:08] [debug] AMX backtrace: [22:27:08] [debug] #0 00000064 in ?? (... <14 arguments>) at <unknown file>:0 [22:27:08] [debug] #1 00000064 in public OnPlayerText () at <unknown file>:0
Код HTML:
[debug] OnPlayerText(1, Sell:Infernus , Bullet , Sandking , Sultan , BuffaloVand:Infernus , Bullet , Sandking , Sultan , BuffaloVand:Infernus , Bullet ,)
Код HTML:
public OnPlayerText(playerid, text[]) {
#if defined DEBUG
printf("[debug] OnPlayerText(%d, %s)", playerid, text);
#endif
if(FindIP(text) || FindAdv(text))
{
if(PlayerData[playerid][pMuted] == 0)
{
PlayerData[playerid][pMuted] = 5;
}
format(szMessage, sizeof(szMessage), "%s server advertisting (%s)", PlayerData[playerid][pNormalName], text);
submitToHelpersAndAdmins(szMessage, COLOR_LIGHTRED);
return 0;
}
if(ReactionState == R_STATE_ACTIVE)
{
if(!strcmp(text, ReactionString, false))
{
new giveplayer[MAX_PLAYER_NAME];
new string[128];
ReactionState = R_STATE_NOT_ACTIVE;
GetPlayerName(playerid,giveplayer,MAX_PLAYER_NAME);
format(string,sizeof(string),"** {FF4800}%s {BFC0C2}won fast event for $%d ! **",giveplayer,ReactionCash);
SendClientMessageToAll(COLOR_WHITE,string);
PlayerData[playerid][pMoney] += ReactionCash;
ReactionCash = 0;
}
}
if(IsMath == 1)
{
new idx;
new tmpz[256];
tmpz = strtok(text, idx);
new resultz = strval(tmpz);
if(mathanswer == resultz)
{
new string[258];
new pnamee[MAX_PLAYER_NAME];
GivePlayerMoney(playerid, 2500);
GetPlayerName(playerid, pnamee, MAX_PLAYER_NAME);
format(string, sizeof(string), "SERVER: %s(%d)won Math Contest. Prize $2,500 [ %d ]",pnamee, playerid, mathanswer);
SendClientMessageToAll(0x66CCCCCC, string);
IsMath = 0;
mathanswer = 0;
math1 = 0;
math2 = 0;
math3 = 0;
}
}
if(TalkingLive[playerid] != 255)
{
new string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerData[playerid][pGroup] == 11)
{
format(string, sizeof(string), "Reporter %s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
}
else
{
format(string, sizeof(string), "LivePlayer %s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
}
return 0;
}
if(PlayerData[playerid][pStatus] >= 1 && PlayerData[playerid][pMuted] == 0)
{
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
for(new i = 0; i < strlen(szPlayerName); i++)
{
if(szPlayerName[i] == '_')
szPlayerName[i] = ' ';
}
if(Mobile[playerid] != 255)
{
format(szMessage, sizeof(szMessage), "(cellphone) %s says: %s", szPlayerName, text);
nearByMessage(playerid, COLOR_WHITE, szMessage);
switch (Mobile[playerid])
{
case 911: {
if(!strcmp(text, "LSPD", true) || !strcmp(text, "police", true)) {
SCM(playerid, COLOR_WHITE, "(cellphone) 911: You have reached the Los Santos Police emergency hotline; can you describe the crime?");
Mobile[playerid] = 912;
}
else if(!strcmp(text, "LSFMD", true) || !strcmp(text, "medic", true) || !strcmp(text, "ambulance", true)) {
SCM(playerid, COLOR_WHITE, "(cellphone) 911: This is the Los Santos Fire & Medic Department emergency hotline; describe the emergency, please.");
Mobile[playerid] = 914;
}
else SCM(playerid, COLOR_WHITE, "(cellphone) 911: Sorry, I didn't quite understand that... speak again?");
}
case 912:
{
if(strlen(text) > 1)
{
new
location[MAX_ZONE_NAME];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
format(szMessage, sizeof(szMessage), "Dispecer: %s: '%s' (10-20 %s)", szPlayerName, text, location);
SendToGroupType(1, COLOR_RADIOCHAT, szMessage);
SendToGroupType(2, COLOR_RADIOCHAT, szMessage);
SendClientMessage(playerid, COLOR_WHITE, "(cellphone) Cops: Thank you for your report.");
SendClientMessage(playerid, COLOR_WHITE, "Your call has been finished.");
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USECELLPHONE) {
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
}
Mobile[playerid] = 255;
}
}
default:
{
if(IsPlayerConnected(Mobile[playerid]))
{
new samp[128];
if(Mobile[Mobile[playerid]] == playerid)
{
if(PlayerData[Mobile[playerid]][pSpeaker] == 1)
{
format(samp, 256, "(speaker) %s: %s",GetName(playerid), text);
nearByMessage(Mobile[playerid], COLOR_GREY, samp);
}
else
{
format(samp, 256, "(cellphone) %s: %s",GetName(playerid), text);
SendClientMessage(Mobile[playerid], COLOR_GREY, samp);
}
}
}
}
}
}
else
{
if(PlayerPaintballing[playerid] == 0)
{
if(PlayerData[playerid][pColor] == 0)
{
format(szMessage, sizeof(szMessage), "{FFFFFF}%s{FFFFFF}: %s", szPlayerName, text);
}
else if(PlayerData[playerid][pColor] == 1)
{
format(szMessage, sizeof(szMessage), "{0087FE}%s{FFFFFF}: %s", szPlayerName, text);
}
else if(PlayerData[playerid][pColor] == 2)
{
format(szMessage, sizeof(szMessage), "{EBFF00}%s{FFFFFF}: %s", szPlayerName, text);
}
else if(PlayerData[playerid][pColor] == 3)
{
format(szMessage, sizeof(szMessage), "{1a1a1a}%s{FFFFFF}: %s", szPlayerName, text);
}
else if(PlayerData[playerid][pColor] == 4)
{
format(szMessage, sizeof(szMessage), "{3ee605}%s{FFFFFF}: %s", szPlayerName, text);
}
else if(PlayerData[playerid][pColor] == 5)
{
format(szMessage, sizeof(szMessage), "{ed2bfa}%s{FFFFFF}: %s", szPlayerName, text);
}
else if(PlayerData[playerid][pColor] == 6)
{
format(szMessage, sizeof(szMessage), "{fb8525}%s{FFFFFF}: %s", szPlayerName, text);
}
else if(PlayerData[playerid][pColor] == 7)
{
format(szMessage, sizeof(szMessage), "{33CCFF}%s{FFFFFF}: %s", szPlayerName, text);
}
if(PlayerData[playerid][pHelper] >= 1) format(szMessage, sizeof(szMessage), "{CC3300}%s:{FFFFFF} %s", szPlayerName, text);
if(PlayerData[playerid][pAdminLevel] >= 1 ) format(szMessage, sizeof(szMessage), "{669999}%s:{FFFFFF} %s", szPlayerName, text);
nearByMessage(playerid, COLOR_GREY, szMessage);
format(szMessage, sizeof(szMessage), "\"%s\"", text);
}
else
{
foreach(Player, g)
{
if(PlayerPaintballing[g] == 1)
{
format(szMessage, sizeof(szMessage), "{9c9aff}%s [%d kills and %d deaths]{FFFFFF}: %s", szPlayerName,KillP[playerid],DeathP[playerid], text);
SCM(g, COLOR_WHITE, szMessage);
}
}
}
}
PlayerData[playerid][pSpamCount]++;
}
return 0;
}