CreateJob Help.. Scanff + ZCMD
#5

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Код:
CMD:createjob(playerid, params[])
{
	new jobname[35];
	new string[128];
  	if(sscanf(params, "s", jobname)) return SendClientMessage(playerid, COLOR_RED1, "ERROR: /createquest <jobname>");
  	
	format(string, sizeof(string), "You named your job: %s", jobname);
  	SendClientMessage(playerid, COLOR_RED1, string);
 	return 1;
}
No need to use isnull if you are using sscanf. Here is the code^

Also s is appropriate for strings.
Needs to be "s[35]" though.
Reply


Messages In This Thread
CreateJob Help.. Scanff + ZCMD - by KingyKings - 23.02.2015, 09:48
Re: CreateJob Help.. Scanff + ZCMD - by zork - 23.02.2015, 09:56
Re: CreateJob Help.. Scanff + ZCMD - by KingyKings - 23.02.2015, 10:02
Re: CreateJob Help.. Scanff + ZCMD - by Gammix - 23.02.2015, 15:01
Re: CreateJob Help.. Scanff + ZCMD - by Kyance - 23.02.2015, 15:25
Re: CreateJob Help.. Scanff + ZCMD - by Vince - 23.02.2015, 15:30

Forum Jump:


Users browsing this thread: 1 Guest(s)