Message is only sending to ID 0
#1

Hello all. I made my phone script. but The problem is, if anyone send an sms, only id 0 can send it(only if its send to his number tho)

For anyone else it says Message Delivered.. but the person who got it cant see it.

PHP код:
CMD:sms(playeridparams[])
{
    if(
PlayerInfo[playerid][Phone] == phone_yes)
    {
        if(
phoneon[playerid] == true)
        {
            new 
text[128]; //<-----  NIET VERGETEN OM STRING SIZE TO DOEN VOOR EEN TEXT OF %S INPUT!!!
            
new pnumber;
            if(!
sscanf(params"is[128]"pnumbertext)) //String size for text.. NIET VERGETEN ANDERS CRASHED ALLES
            
{
                foreach(
Playeri)
                {
                    if(
PlayerInfo[i][Phone] == phone_yes)
                    {
                        if(
PlayerInfo[i][PhoneNumber] == pnumber)
                        {
                            if(
phoneon[i] == true)
                            {
                                if(
!= playerid)
                               {
                                    new 
string[265], string2[265];
                                    new 
pnumber2;
                                    
pnumber2 PlayerInfo[playerid][PhoneNumber];
                                    
format(stringsizeof(string), "[SMS]%i: %s."pnumber2text);
                                    
SendClientMessage(iTEAM_RADIO_COLORstring);
                                    
format(string2sizeof(string2), "You just sended a text message to %i"pnumber);
                                    
SendClientMessage(playeridTEAM_RADIO_COLORstring2);
                                    
PlayerPlaySound(i,1085,0.0,0.0,0.0);
                                    return 
1;
                                }
                            }
                            else return 
SendClientMessage(playeridCOLOR_GREY"This player has his/her phone turned off!");
                        }
                        return 
1;
                    }
                }
                return 
1;
            }
            else return 
SendClientMessage(playeridCOLOR_GREY"USAGE: /sms [Phone Number] [SMS text]");
        }
        else return 
SendClientMessage(playeridCOLOR_GREY"You have your phone turned off!");
    }
    else return 
SendClientMessage(playeridCOLOR_GREY"You don't have a phone!");

Reply


Messages In This Thread
Message is only sending to ID 0 - by milanosie - 20.01.2012, 09:58
Re: Message is only sending to ID 0 - by Unte99 - 20.01.2012, 10:38
Re: Message is only sending to ID 0 - by milanosie - 20.01.2012, 10:49
Re: Message is only sending to ID 0 - by Vince - 20.01.2012, 10:49
Re: Message is only sending to ID 0 - by milanosie - 20.01.2012, 10:53
Re: Message is only sending to ID 0 - by milanosie - 20.01.2012, 13:05
Re: Message is only sending to ID 0 - by milanosie - 20.01.2012, 15:19
Re: Message is only sending to ID 0 - by [ABK]Antonio - 20.01.2012, 16:09
Re: Message is only sending to ID 0 - by Eric - 20.01.2012, 16:13
Re: Message is only sending to ID 0 - by Michael@Belgium - 20.01.2012, 16:24

Forum Jump:


Users browsing this thread: 2 Guest(s)