SA-MP Forums Archive
setjob(playerid, jobid) - 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)
+--- Thread: setjob(playerid, jobid) (/showthread.php?tid=403258)



setjob(playerid, jobid) - cluckintucker - 29.12.2012

hello guys i just needed some help i want to make a command using zcmd setjob using "wJob" so when i /setjob it says
"Syntax: [playerid] [jobid] and if he types a playerid and job id it gives them the job using wJob and if its not a right id it will return with a message saying "unknown id" i hope thats not to much to ask for btw i only have 2 job ids and heres the code i currently was using.
Код:
new string[128], giveplayerid, wJob;
	if(sscanf(params, "ud", giveplayerid, wJob)) return SendClientMessage(playerid, 0xAFAFAFFA, "USAGE: /setjob [playerid] [jobid]");

	if(IsPlayerConnected(giveplayerid))
			{
	wJob[playerid] > (giveplayerid)