All pastes #439501 Raw Edit

viKKmaN's Code

public text v1 · immutable
·published 2007-04-14 09:21 UTC
rendered paste body
	if(strcmp(cmd, "/needtaxi", true) == 0)
	{
		GetPlayerName(playerid, sendername, sizeof(sendername));
		new length = strlen(cmdtext);
		while ((idx < length) && (cmdtext[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[64];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = cmdtext[idx];
			idx++;
		}
		result[idx - offset] = EOS;
		if(!strlen(result))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /needtaxi [location]");
			return 1;
		}
		if ((noooc) && (PlayerInfo[playerid][pAdmin] < 1))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "   the taxi channel has been disabled by admin");
			return 1;
		}
		format(string, sizeof(string), "%s needs a taxi at  %s.Call %d for more info.",  sendername, result, PlayerInfo[playerid][pPnumber]);
		OOCOff(COLOR_YELLOW,string);
		if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
		printf("%s", string);
		return 1;
	}