- 0
Problema /sms
-
Similar Content
-
- 7 answers
- 1,693 views
-
- 3 answers
- 1,932 views
-
- 3 replies
- 238 views
-
- 1 reply
- 191 views
-
- 1 answer
- 601 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now