dcmd - kick
#4

I did what you both said, (I put the dcmd_kick ABOVE the OnPlayerCommandText) and the error ("undefined object "params"") did not appear anymore.

Although, I got this error:

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\samp02Xserver.win32\gamemodes\VDM.pwn(401) : error 035: argument type mismatch (argument 2)
The error appears in the code of Vince:

Код:
dcmd_kick(playerid, params[])
{
	if(!IsPlayerAdmin(playerid)) return 0;
	new targetid, reason[64], string[128];
	if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Usage: /kick [playerid/partofname] [reason]");
	if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Player not connected!");
	format(string, sizeof(string), "You have been kicked! Reason: %s", reason);
	SendClientMessage(targetid, string);
	Kick(targetid);
	return 1;
}
Line 401 = SendClientMessage(targetid, string);

Edit: I just noticed it, the color wasn't added

SendClientMessage(targetid, RED, string);
Reply


Messages In This Thread
dcmd - kick - by V_FoR_VendettA - 17.07.2009, 09:53
Re: dcmd - kick - by refshal - 17.07.2009, 10:56
Re: dcmd - kick - by Vince - 17.07.2009, 11:10
Re: dcmd - kick - by V_FoR_VendettA - 17.07.2009, 14:45
Re: dcmd - kick - by mamorunl - 17.07.2009, 14:47

Forum Jump:


Users browsing this thread: 2 Guest(s)