My phone script crashes my server :(
#2

Updated it: Still wont work

PHP Code:
CMD:sms(playeridparams[])
{
    if(
PlayerInfo[playerid][Phone] == phone_yes)
    {
        if(
phoneon[playerid] == true)
        {
            new 
text;
            new 
pnumber;
            if(!
sscanf(params"is"pnumbertext))
            {
                foreach(
Playeri)
                {
                    if(
PlayerInfo[i][Phone] == phone_yes)
                    {
                        if(
PlayerInfo[i][PhoneNumber] == pnumber)
                        {
                            if(
phoneon[i] == true)
                               {
                                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
My phone script crashes my server :( - by milanosie - 19.01.2012, 13:31
Re: My phone script crashes my server :( - by milanosie - 19.01.2012, 14:04
Respuesta: My phone script crashes my server :( - by OPremium - 19.01.2012, 14:12
Re: My phone script crashes my server :( - by milanosie - 19.01.2012, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)