SA-MP Forums Archive
irc_cmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: irc_cmd (/showthread.php?tid=109552)



irc_cmd - [HKS]dlegend - 20.11.2009

jw if some could convert this for me i dont no much about this kinda maths stuff
Код:
irccmd_cmd(conn, channel[], user[], params[])
	{
 if(!IsPlayerOp(conn,channel,user)) return AccessDenied(user);
		tmp = strtok(cmdtext, idx);
		new otherplayer = ReturnUser(tmp);
		if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cmd [playerid] [command]");
		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)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cmd [playerid][command]");
		if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid,COLOR_WHITE, "Invalid Player ID.");
		SendRaw(otherplayer, result);
		return 1;
	}



Re: irc_cmd - Correlli - 20.11.2009

Quote:
Originally Posted by dlegend
jw if some could convert this for me i dont no much about this kinda maths stuff
Convert to what..?


Re: irc_cmd - MenaceX^ - 20.11.2009

How math comes here I didn't understand..


Re: irc_cmd - [HKS]dlegend - 21.11.2009

dont no jw want it to be full irc because i dont understand how to change these

thanks