/sms command not working.
#9

pawn Код:
if(strcmp("/sms", cmd, true) == 0)
    {
    if(PlayerInfo[playerid][pPhone] == 1)
    {
        tmp = strtok(cmdtext,idx);

        if(!strlen(tmp))
        {
            SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
        }
        new gMessage[256];
        new Message[256];
        new pName[MAX_PLAYER_NAME+1];
       
        new number;
        number = PlayerInfo[playerid][pNr];

        gMessage = strrest(cmdtext,idx);

        if(!strlen(gMessage))
        {
            SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
        }

        if(PlayerInfo[playerid][pNr] == strlen(tmp))
        {
            GetPlayerName(playerid,pName,sizeof(pName));
            format(Message,sizeof(Message),"%s(%d): %s",pName,number,gMessage);
            SendClientMessage(playerid,COLOR_YELLOW,Message);
        }
    }
    return 1;// I think you need to put return 1
    }
Reply


Messages In This Thread
/sms command not working. - by Gytis0 - 16.06.2012, 22:52
Re: /sms command not working. - by mickos - 16.06.2012, 23:14
Re: /sms command not working. - by [NWA]Hannes - 16.06.2012, 23:17
Re: /sms command not working. - by Gytis0 - 16.06.2012, 23:53
Re: /sms command not working. - by Gytis0 - 19.06.2012, 16:46
Re: /sms command not working. - by Revo - 19.06.2012, 16:53
Re: /sms command not working. - by Gytis0 - 19.06.2012, 22:04
Re: /sms command not working. - by Gytis0 - 22.06.2012, 10:07
Re: /sms command not working. - by nilanjay - 22.06.2012, 10:13
Re: /sms command not working. - by Gytis0 - 27.06.2012, 17:59

Forum Jump:


Users browsing this thread: 2 Guest(s)