22.10.2011, 16:11
(
Последний раз редактировалось Blackfuck; 22.10.2011 в 16:32.
Причина: Error en el titulo, era fakechat
)
Код:
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=[fakechat]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- if(strcmp(cmd, "/fakechat", true) == 0) { if(PlayerInfo[playerid][pAdmin] < 7) return DenyMessage(playerid, 7); new tmp3[256]; tmp = strtok(cmdtext, idx); new faked = ReturnUser(tmp); tmp3 = strtok(cmdtext, idx); new length = strlen(cmdtext); new id; cmd = strtok(cmdtext, id); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USO: /fakechat [ID] [reason]"); if(!strlen(tmp3)) return SendClientMessage(playerid, COLOR_WHITE, "USO: /fakechat [ID] [reason]"); if(IsPlayerConnected(faked) && IsPlayerConnected(faked)) GetPlayerName(faked); SendPlayerMessageToAll(faked, (result)); format((result),sizeof((result)),"%s[%d]: %s",faked,(result)); SendClientMessage(playerid, COLOR_WHITE, "ID De jugador invalida."); return 1; }
Saludos y gracias, ya me ayudaron bastante leyendo.