25.04.2015, 22:26
Ya lo hice, ahora que pruebo el comando no me anda IG
Ya hice la definiciуn de los dos variables.
Ya hice la definiciуn de los dos variables.
Код:
zcmd(asignar, playerid, params[]) { new asignar[32]; if(sscanf(params, "s[32]", asignar)) { SendClientMessage(playerid, COLOR_WHITE, "Info: Uso correcto: /Asignar faccion [ID Jugador] [ID Facciуn]"); return 1; } else if(strcmp(asignar, "faccion", true) == 0) { if(Info[playerid][pAdminZC] > 1337) { if(!sscanf(params, "ui", lookupid, factionid)) { new ftext[30]; if(params[1] < 0 || params[1] > MAX_FACTION) return SendClientMessageEx(playerid, COLOR_GREY, "ID facciуn incorrecto."); if(!IsPlayerConnected(params[0])) return SendClientMessageEx(playerid, COLOR_GREY, "Jugado desconectado."); switch(params[1]) { case 0: {Info[params[0]][pRank] = 0; ftext = "Ninguna"; } case 1: {Info[params[0]][pRank] = 6; ftext = "San Andreas Police Department"; } case 2: {Info[params[0]][pRank] = 6; ftext = "FBI"; } case 3: {Info[params[0]][pRank] = 6; ftext = "San Andreas Ejйrcito Militar"; } case 4: {Info[params[0]][pRank] = 6; ftext = "San Andreas Medical Deparment"; } case 5: {Info[params[0]][pRank] = 6; ftext = "SA News"; } case 6: {Info[params[0]][pRank] = 6; ftext = "Taller de mecбnicos LS"; } case 7: {Info[params[0]][pRank] = 6; ftext = "Gobierno"; } case 8: {Info[params[0]][pRank] = 6; ftext = "Hitman"; } case 9: {Info[params[0]][pRank] = 6; ftext = "Sistema Judicial"; } } new string[128]; pTazer[params[0]] = 0; Info[params[0]][pLeader] = params[1]; Info[params[0]][pMember] = params[1]; format(string, sizeof(string), "* El administrador %s te asignу el lнder de la facciуn %s.", GetPlayerNameEx(playerid), ftext); SendClientMessageEx(params[0], 0x6ADFFFFF, string); format(string, sizeof(string), "Administraciуn: %s asignу lнder de la facciуn %s a %s.", GetPlayerNameEx(playerid), ftext, GetPlayerNameEx(params[0])); ABroadCast(COLOR_WHITE, string, 3); } else SendClientMessageEx(playerid, COLOR_GRAD2, "USA: /asignar faccion [ID Jugadir] [ID Facciуn]"); } else SendClientMessageEx(playerid, COLOR_WHITE, "Informaciуn: No puedes utilizar йste comando."); return 1; } return 1; }