- 0
Problema sms
-
Similar Content
-
- 2 replies
- 241 views
-
- 0 replies
- 90 views
-
- 1 answer
- 240 views
-
- 3 answers
- 356 views
-
- 3 replies
- 408 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
iulian24
Se intampla ca atunci cand intru in joc, sa mearga sa trimit / primesc sms-uri de la playeri, totul e ok.
Dar cateodata se intampla sa scriu un sms si sa nu imi apara nimic, nici-o eroare, pur si simplu nimic, Ceva idei de rezolvare va rog?
CMD:sms(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(IsPlayerConnected(playerid))
{
new phonenumb,smstext[90],sendername[30],giveplayer[30],string[256],giveplayerid,string2[184];
if(PlayerInfo[playerid][pMuted] == 1)
{
format(string, sizeof(string), "You can not speak, you have been silenced for %d seconds.",PlayerInfo[playerid][pMuteTime]);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
return 1;
}
if(sscanf(params, "is[90]",phonenumb,smstext)) return SendClientMessage(playerid, 0xFFFFFFFF,"{FF9900}Scrie: {33CCFF}/sms <Number> <Text>");
if(FindIP(smstext)) /// Anti-Reclama
{
new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "{f03337}Warning: %s(%d) typed %s in /sms.", advertiser, playerid, smstext);
ABroadCast(COLOR_WHITE,string,1);
}
for(new i; i < sizeof(TLD); i++)
{
if(strfind(smstext, TLD, true) != -1)
{
if(strfind(smstext, "rpg-green-zone.forumgratuit.ro", true) != -1 || strfind(smstext, "rpg-green-zone.forumgratuit.ro", true) != -1 || strfind(smstext, "rpg-green-zone.forumgratuit.ro", true) != -1) break;
new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "{f03337}Warning: %s(%d) typed %s in /sms.", advertiser, playerid, smstext);
ABroadCast(COLOR_WHITE,string,1);
}
}
if(PlayerInfo[playerid][pPnumber] == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You dont't have a cell phone.");
if(PhoneOnline[playerid] > 0) return SCM(playerid, COLOR_WHITE, "{FFB870}Your phone turned off.");
if(PlayerInfo[playerid][pCredits] < 2) return SCM(playerid,COLOR_WHITE,"{FFB870}You don't have credits needed.");
foreach(Player,i)
{
if(PlayerInfo[pPnumber] == phonenumb && phonenumb != 0)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
giveplayerid = i;
if(PhoneOnline[giveplayerid] > 0) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}That players phone is offline.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "SMS from %s (%d): %s",sendername,PlayerInfo[playerid][pPnumber],smstext);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string2, sizeof(string2), "{63969C}SMS sent to %s (%d): %s",giveplayer,PlayerInfo[giveplayerid][pPnumber],smstext);
SendClientMessage(giveplayerid,COLOR_YELLOW, string);
SendClientMessage(playerid,COLOR_WHITE, string2);
new var100[300],resulttt[300],strr[300];
format(strr, sizeof(strr),"(sms) %s",smstext);
mysql_real_escape_string(strr, resulttt);
mysql_format(SQL,var100, sizeof(var100), "INSERT INTO chat_logs (`playerid`,`text`) VALUES ('%d','%s')", PlayerInfo[playerid][pSQLID],resulttt);
mysql_tquery(SQL,var100,"","");
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlaySound(giveplayerid, 1139, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pCredits] = PlayerInfo[playerid][pCredits] - 2;
LastPlayer = playerid;
for(new adm = 0; adm<=MAX_PLAYERS;adm++)
{
if(IsPlayerConnected(adm))
{
if(PlayerInfo[adm][pAdmin] > 0 && BigEar[adm] == 1)
{
format(string, sizeof(string), "{63969C}SMS from %s (%d) to %s (%d): %s",sendername,playerid,giveplayer,giveplayerid,smstext);
SendClientMessage(adm, COLOR_WHITE, string);
}
}
}
}
}
}
}
}
return 1;
}
Link to comment
Share on other sites
5 answers to this question
Recommended Posts