Command
#1

Can someone tell me why this doesn't work?

pawn Код:
if(!strcmp(sub_cmd, "sms"))
    {
        new targetid, number, text[128];
       
        if (sscanf(params, "ds[128]", number, text)) return SCM(playerid, COLOR_LIGHTRED, "* [USAGE]: /phone sms [phone number] [message]");

        if (!number) return SCM(playerid, COLOR_LIGHTRED, "* The specified phone number is not in service.");
       
        //if (targetid == playerid) return SCM(playerid, COLOR_LIGHTRED, "* You can't text yourself.");
       
        if (Player[targetid][PhoneStatus] == 0) return SCM(playerid, COLOR_LIGHTRED, "* The recipient has their phone powered OFF.");
       
        if ((targetid = GetNumberOwner(number)))
    {
        GivePlayerMoney(playerid, -1);
        SetMoneyInfo(playerid, 1, false, 2000);
       
        ShowPlayerFooter(playerid, "You've been ~r~charged~w~ $1 to send a text.");

        SendClientMessageEx(targetid, COLOR_YELLOW, "[TEXT]: %s - %s (%d)", text, ReturnName(playerid, 0), Player[playerid][PhoneNumber]);
        SendClientMessageEx(playerid, COLOR_YELLOW, "[TEXT]: %s - %s (%d)", text, ReturnName(playerid, 0), Player[playerid][PhoneNumber]);

        PlayerPlaySound(targetid, 1057, 0.0, 0.0, 0.0);
       
        SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "* %s takes out %s phone and sends a text.", ReturnName(playerid, 0), CheckSex(playerid));
    }
I do /phone sms 61333 (my ig phone number) test and doesn't work. No messages or anything.
Reply


Messages In This Thread
Command - by KinderClans - 21.09.2018, 09:40
Re: Command - by Flamehaze7 - 21.09.2018, 09:53
Re: Command - by GTLS - 21.09.2018, 13:03
Re: Command - by KinderClans - 21.09.2018, 13:25
Re: Command - by kingmk - 21.09.2018, 13:59
Re: Command - by GTLS - 22.09.2018, 07:06
Re: Command - by SyS - 22.09.2018, 07:27
Re: Command - by KinderClans - 22.09.2018, 12:55
Re: Command - by UFF - 22.09.2018, 13:14
Re: Command - by KinderClans - 22.09.2018, 13:44

Forum Jump:


Users browsing this thread: 1 Guest(s)