- 0
Problema /sms
-
Similar Content
-
- 1 reply
- 147 views
-
Problema
By ImJustSlim,
- 3 answers
- 259 views
-
- 2 replies
- 141 views
-
- 1 answer
- 283 views
-
- 6 answers
- 1,126 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
By ImJustSlim,
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Shad0wdpbgd
Salut, am o problema la comanda sms.
Deci, eu pot sa trimit de pe un alt cont sms la un alt jucator, dar de pe contul care am primit smsu nu pot sa dau sms back (de ex primesc sms de la nr 2323, eu pot sa il vad si e totu ok, dar nu pot sa dau /sms 2323 sa ii raspuns, efectiv nu imi zice nimic), sper ca am fost inteles
YCMD:sms(playerid, params[], help)
{
if(PlayerInfo[playerid][pPhone] == 0) return SCM(playerid, COLOR_GREY, "Nu ai un telefon.");
if(PlayerInfo[playerid][pPhoneCredit] == 0) return SCM(playerid, COLOR_GREY, "You don't have enough credit.");
new id, text[90], nrtel;
if(sscanf(params, "is[90]", nrtel, text)) return SendSyntax(playerid, "/sms <number> <message>");
if(!IsPlayerLogged(id)) return SCM(playerid, COLOR_GREY, "Player not connected.");
if(!IsPlayerLogged(id) && id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Invalid number!");
// if(id == playerid) return SCM(playerid, -1, "Nu poti sa folosesti aceasta comanda asupra ta.");
if(PlayerInfo[id][pPhoneOn] == 0) return SCM(playerid, COLOR_GREY, "This player have his phone turned off.");
if(PlayerInfo[playerid][pPhoneOn] == 0) return SCM(playerid, COLOR_GREY, "You have the phone turned off.");
foreach(new i : Player)
{
if(PlayerInfo[id][pPhoneNumber] == nrtel && nrtel != 0)
{
SCMF(playerid, 0xC8E0DFFF, "SMS sended to %s (%d): %s", GetName(id), PlayerInfo[id][pPhoneNumber], text);
SCMF(id, COLOR_YELLOW, "SMS from %s (%d): %s", GetName(playerid), PlayerInfo[playerid][pPhoneNumber], text);
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pPhoneCredit] --;
mysqlQuery("UPDATE `server_accounts` SET `PhoneCredits` = '%d' WHERE `ID` = '%d'", PlayerInfo[playerid][pPhoneCredit], PlayerInfo[playerid][pSQLID]);
}
return true;
}
SendClientMessage(playerid, COLOR_GREY, "Invalid number!");
return true;
}
HELP VA ROG, AM INCERCAT TOT CE ESTE POSIBIL
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.