error 017: undefined symbol "cmd" error 017: undefined symbol "sendername" error 017: undefined symbol "sendername" error 029: invalid expression, assumed zero |
CMD:mole(playerid, params[]) if(strcmp(cmd, "/mole", true) == 0 && PlayerInfo[playerid][pAdmin] >= 5) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[96]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mole [text]"); return 1; } format(string, sizeof(string), "SMS: %s, Sender: Server (555)",result); SendClientMessageToAll(COLOR_YELLOW, string); } return 1; } |
if(strcmp(cmd, "/mole", true) == 0 && PlayerInfo[playerid][pAdmin] >= 5)
CMD:mole(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
return 1;
}
new string[128];
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mole [mole text]");
format(string, sizeof(string), "SMS: %s, Sender: Server",params);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}