samp /pm command
#9

Quote:
Originally Posted by Ox1gEN
Посмотреть сообщение
Well it is supposed to look something like this:

Код:
CMD:sms(playerid, params[])
{
	new string[128], text[128], number[50];
	if(sscanf(params, "ss[50]", number, text)) return SendClientMessage(playerid, -1, "USAGE: /SMS [Number] [Text]");
	else
	{	
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(!strcmp(number, pInfo[i][Number]))
			{
				format(string, sizeof(string), "SMS Sent to %s: %s", GetName(i), text);
				SendClientMessage(playerid, -1, string);

				format(string, sizeof(string), "SMS From %s: %s", GetName(playerid), text);
				SendClientMessage(i, -1, string);
			}
			else
			{
				SendClientMessage(playerid, -1, "**BEEP** It seems that number doesn't exist **BEEP**");
			}
		}

	}
	return 1;
}
It wasn't tested because I don't have a phone system on my script therefore it is UNTESTED anyways, MAKE SURE to replace if(!strcmp(number, pInfo[i][Number])) with YOUR variable that is used to fetch the targets number.

I hope this works and helped you.
error 017: undefined symbol "GetName"
error 017: undefined symbol "GetName"

Idk how to script stock GetName(i)
Reply


Messages In This Thread
samp /pm command - by TheNerka - 28.08.2014, 18:31
Re: samp /pm command - by Abagail - 28.08.2014, 18:39
Re: samp /pm command - by TheNerka - 28.08.2014, 18:43
Re: samp /pm command - by TheNerka - 29.08.2014, 06:09
Re: samp /pm command - by Ox1gEN - 29.08.2014, 06:36
Re: samp /pm command - by TheNerka - 29.08.2014, 06:49
Re: samp /pm command - by AroseKhanNiazi - 29.08.2014, 09:23
Re: samp /pm command - by Ox1gEN - 29.08.2014, 10:11
Re: samp /pm command - by TheNerka - 29.08.2014, 10:50
Re: samp /pm command - by Thogy - 29.08.2014, 10:59

Forum Jump:


Users browsing this thread: 1 Guest(s)