Error, But i dont know how to fix
#4

Quote:
Originally Posted by ► James_Alex
can you show us your cmd and idx sources ?
sure the command:
Код:
	new string[256];
 	dcmd(login,5,cmdtext);
 	dcmd(register,8,cmdtext);
	new cmd[128], tmp[128], idx;
	cmd = strtok(cmdtext, idx);
	if(!strcmp("/job", cmd, true)) if(Logged[playerid] == 1)
	{
	tmp = strtok(cmdtext, idx);
	if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "[ ! ] USAGE: /job <JobName>") && SendClientMessage(playerid,COLOR_WHITE,"[ ! ] List of jobs: cop, swat, robber");
	if (!strcmp("cop", tmp, true)) if(IsPlayerJob(playerid) == 1)
	{
	 	if(GetPlayerMoney(playerid) <= 25) return SendClientMessage(playerid,COLOR_RED,"[ ! ] Not enough Money! You need 2000!");
	GivePlayerMoney(playerid, -2000);
	RemovePlayerJob(playerid);
	SetPlayerJob(playerid,2);
	SendClientMessage(playerid,TEAM_COP_COLOR,"[ ! ] Cheif of police: Welcome to officer son !");
	SendClientMessage(playerid,ADMIN_MSG,"[ ! ] You are kicked for ( PLEASE RESTART GAME :) )");
	Kick(playerid);
	return 1;
	}
Reply


Messages In This Thread
Error, But i dont know how to fix - by GforceNL - 30.08.2009, 13:45
Re: Error, But i dont know how to fix - by James_Alex - 30.08.2009, 13:54
Re: Error, But i dont know how to fix - by DeathOnaStick - 30.08.2009, 14:19
Re: Error, But i dont know how to fix - by GforceNL - 30.08.2009, 14:20
Re: Error, But i dont know how to fix - by Jefff - 30.08.2009, 14:21
Re: Error, But i dont know how to fix - by MenaceX^ - 30.08.2009, 14:26
Re: Error, But i dont know how to fix - by GforceNL - 30.08.2009, 14:28
Re: Error, But i dont know how to fix - by DeathOnaStick - 30.08.2009, 14:31

Forum Jump:


Users browsing this thread: 1 Guest(s)