21.03.2011, 10:36
hey scripters
i started witch sscanf/dcmd
what is wrong here
i started witch sscanf/dcmd
what is wrong here
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256], idx; cmd = strtok(cmdtext, idx); dcmd(ban, 3, cmdtext); dcmd_ban(playerid, params[]) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); if(!IsPlayerAdmin(playerid)) return 0; new targetid, reason[64], string[128]; if(sscanf(params, "uz", targetid, reason)) return SendClientMessage(playerid, COLOR_RED, "Usage: /ban [playerid/partofname] [reason]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Player not connected or is yourself!"); format(string, sizeof(string), "%s has been banned (Reason: %s)",pName, reason); SendClientMessageToAll(COLOR_RED, string); // Sending the string to all Ban(targetid); } }
PHP код:
(1326) : error 017: undefined symbol "dcmd_ban"
(1327) : error 017: undefined symbol "dcmd_ban"
(1333) : error 017: undefined symbol "params"