25.05.2011, 08:54
im tryin 2 make a dcmd cmd but some bullshit error?
please help ^^
Код:
dcmd_kick(playerid, params[]) { new pName[MAX_PLAYER_NAME]; // Here we are defining the kicking's name GetPlayerName(targetid, pName, sizeof(pName));//<-- line 357 if(!IsPlayerAdmin(playerid)) return 0; // Checking if the player is rcon. new targetid = strval(params); new reason[64], string[128]; // targetid is also a pName if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_RED, "Syntax: /kick [playerid] [reason]"); //if(targetid == playerid) return SendClientMessage(playerid,COLOR_RED,"You Cant Kick Yourself!"); // here it tells the player to use /kick playerid reason or /kick partofname reason if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "This Player Isnt Online"); // This is if the player is not connected, or you can't kick yourself. format(string, sizeof(string), "{FF66FF}**KICK: %s (ADMIN KICK) Reason: %s",pName, reason); SendClientMessageToAll(COLOR_RED, string); // The yellow define will be up! Kick(targetid); return 1; }
Код:
C:\Users/**********\Desktop\********\gamemodes\lvdm.pwn(357) : error 017: undefined symbol "targetid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.