17.07.2009, 14:45
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:
The error appears in the code of Vince:
Line 401 = SendClientMessage(targetid, string);
Edit: I just noticed it, the color wasn't added![Cheesy](images/smilies/biggrin.png)
SendClientMessage(targetid, RED, string);
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)
Код:
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; }
Edit: I just noticed it, the color wasn't added
![Cheesy](images/smilies/biggrin.png)
SendClientMessage(targetid, RED, string);