28.03.2011, 14:17
Buenop descargue este sistema admin pero lo quiero editar a mi gusto es decir quiero que tenga 5 niveles en ves de el nivel 1, 2, 3, 1337 y 1338 no entiendo x q esos numeros como lo edito? bueno quiero editar eso y poder cambiar los comandos para cada nivel a mi gusto x q algunos no me gustan en el orden q estan BUENO Y MI otra duda es q entro con la rcon y no me hago admin pues probe en el scriptfile en ese archivo q se origina y decia mi nombre de usuario entonces entre le puse ahi admi y guarde y sali y no funcionaba їque puedo hacer? bueno aqui el sistema:
perdon ya edite
perdon ya edite
Код:
/* porfavor no remover creditos Creditos: Raptor admin (Comandos base) camiloasc1 (Traduccion al espaсol + nuevos niveles + todos los dialogos + algunos comandos (/carcel /ac ...)) */ //includes #include <a_samp> //defines //colores #define COLOR_WHITE 0xFFFFFFAA #define COLOR_GREEN 0x00A300AA #define COLOR_ADMIN 0xFF6347AA #define COLOR_AZUL 0x33CCFFAA //comando /vigilar #define ADMIN_SPEC_TYPE_NONE 0 #define ADMIN_SPEC_TYPE_PLAYER 1 #define ADMIN_SPEC_TYPE_VEHICLE 2 //carpeta de las cuentas #define ACCOUNTS_FOLDER "/Usuarios/%s.ini" //enum enum aInfo { aPassword[128], aLogged, aAdmin, aMuertes, aAsesinatos, aDinero, aCarcel, aTiempoCarcel, aBloqueado, aSilencio } ; //new new AccountInfo[MAX_PLAYERS][aInfo]; new register[MAX_PLAYERS]; new login[MAX_PLAYERS]; new adminservicio[MAX_PLAYERS]; new sendername[MAX_PLAYER_NAME]; // comando /vigilar new gVigiladoID[MAX_PLAYERS]; new gVigiladoType[MAX_PLAYERS]; //nombre de los carros new Veiculos[][] ={ "Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Camion De Bomberos","Trashmaster", "Stretch","Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto", "Taxi","Washington","Bobcat","Mr Whoopee","BF Injection","Hunter","Premier","Enforcer","Securicar","Banshee", "Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo", "RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer", "Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer", "PCJ-600","Faggio","Freeway","RC Baron","RC Raider","Glendale","Oceanic","Sanchez","Sparrow","Patriot", "Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina","Comet","BMX", "Burrito","Camper","Marquis","Baggage","Dozer","Maverick","Maverick De Noticias","Rancher","FBI Rancher","Virgo", "Greenwood","Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa", "RC Goblin","Hotring Racer (A)","Hotring Racer (B)","Bloodring Banger","Rancher","Super GT","Elegant", "Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain","Nebula","Majestic", "Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona", "FBI Truck","Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight", "Streak","Vortex","Vincent","Bullet","Clover","Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob", "Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster (A)","Monster (B)","Uranus", "Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight", "Trailer","Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford", "BF-400","Van De Noticias","Tug","Trailer A","Emperor","Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer ©", "Andromada","Dodo","RC Cam","Launch","Carro Policial (LS)","Carro Policial (SF)","Carro Policial (LV)","Rancher Policial", "Picador","Tanque S.W.A.T.","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer (A)","Luggage Trailer (B)", "Escaleras","Boxville","Farm Plow","Utility Trailer" }; //forward forward Segundo(); forward cprivado(carid); forward OnPlayerUpdate(playerid); forward AdminChat(color,const string[],level); //pickup new admin1; new admin2; new admin3; new admin4; new admin5; new admin6; new admin7; new admin8; new admin9; public OnFilterScriptInit() { AddStaticPickup(1240,15,229.4220,1110.6449,1080.9922); // vida casa admin AddStaticPickup(1242,15,228.7789,1108.4375,1080.9995); // blindaje casa admin admin1 = CreatePickup(1273,23,1123.8064,-2037.0422,69.8860);// afuera casa admin2 = CreatePickup(1273,23,226.8949,1114.2380,1080.9960);// adentro casa admin3 = CreatePickup(1239,15,246.7516,1116.4525,1080.9922);// i de /admincmd admin4 = CreatePickup(1318,23,241.3630,1116.9242,1084.9922);// /vigilar admin5 = CreatePickup(1318,23,243.2446,1111.4836,1085.0391);// /vigilarcarro admin6 = CreatePickup(1272,15,238.1675,1118.2551,1080.9922);// on duty admin7 = CreatePickup(1273,15,235.9196,1118.4015,1080.9922);// off duty admin8 = CreatePickup(1275,23,246.9019,1114.2311,1080.9922);// ropa admin admin9 = CreatePickup(1314,15,236.6086,1118.4254,1084.9922);// desbloquea al admin SetTimer("Segundo", 1000, 1); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerConnect(playerid) { AccountInfo[playerid][aLogged] = 0; AccountInfo[playerid][aAdmin] = 0; AccountInfo[playerid][aBloqueado] = 0; AccountInfo[playerid][aSilencio] = 0; adminservicio[playerid] = 0; return 1; } public OnPlayerDisconnect(playerid, reason) { /* Descomentar si quieren usar los mensajes de cuando sale un jugador new string[256]; GetPlayerName(playerid, sendername, sizeof(sendername)); switch(reason) { case 0: { format(string, sizeof(string), "%s ha salido del servidor! (Crash)", sendername); SendClientMessageToAll(0xBBBBBBAA, string); } case 1: { format(string, sizeof(string), "%s ha salido del servidor! (Salio)", sendername); SendClientMessageToAll(0xBBBBBBAA, string); } case 2: { format(string, sizeof(string), "%s ha salido del servidor! (Expulsado)", sendername); SendClientMessageToAll(0xBBBBBBAA, string); } } */ OnPlayerUpdate(playerid); AccountInfo[playerid][aLogged] = 0; register[playerid] = 0; login[playerid] = 0; return 1; } public OnPlayerSpawn(playerid) { new string[256]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), ACCOUNTS_FOLDER, name); if (AccountInfo[playerid][aLogged] == 0) { if (!fexist(string)) { new kayitmsg[256];// SA-FR <Aqui el nombre de su sevidor lo cambian en todas partes format(kayitmsg,256,"Bienbenido a SA-FR\n\n%s Registrate si quieres jugar\n\nEscribe tu nueva contraseсa:",name); ShowPlayerDialog(playerid,26,DIALOG_STYLE_INPUT,"Registrar",kayitmsg,"Registrar","Salir"); register[playerid] = 1; login[playerid] = 0; } else if (fexist(string)) { new girismsg[256]; format(girismsg,256,"Bienbenido a SA-FR\n\nGracias por preferirnos %s\n\nEscribe tu contraseсa:",name); ShowPlayerDialog(playerid,27,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Salir"); register[playerid] = 0; login[playerid] = 1; } } SetPlayerInterior(playerid,0); if(AccountInfo[playerid][aAdmin] > 0) { SetPlayerPos(playerid,1265.4495,-2047.3251,59.2685); SetPlayerSkin(playerid,217); } else { ResetPlayerWeapons(playerid); //en donde quieran que aparesca si no es admin SetPlayerPos(playerid,-2326.4900,-1629.3300,483.7027); } return 1; } //se recomienda borrar esta funcion del gm y dejar solo esta //pueden modificar la funcion para agregar la de su gm public OnPlayerDeath(playerid, killerid, reason) { AccountInfo[playerid][aMuertes] ++; if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); if(AccountInfo[playerid][aAdmin] > 0) { //pueden poner mas cosas SendClientMessage(playerid,COLOR_WHITE,"* Eres admin no nesecitas suicidarte !"); } else { //lo pueden cambiar y poner otras cosas ResetPlayerWeapons(playerid); } } else { SendDeathMessage(killerid,playerid,reason); //si quieren que haga algo mas AccountInfo[killerid][aAsesinatos] ++; if(AccountInfo[playerid][aAdmin] == 0) { //por si quieren mas cosas ResetPlayerWeapons(playerid); } } return 1; } public OnPlayerText(playerid, text[]) { //si esta silenciado if(AccountInfo[playerid][aSilencio] == 1) { SendClientMessage(playerid,COLOR_ADMIN, "* Estas silenciado y no puedes hablar"); return 0; } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { //si esta bloqueado if(AccountInfo[playerid][aBloqueado] == 1) { SendClientMessage(playerid,COLOR_ADMIN, "* Estas bloqeado y no puedes usar comandos"); return 1; } //new new cmd[256]; new string[256]; new giveplayerid, idx; new giveplayer[MAX_PLAYER_NAME]; //imprime en el log al usar un comando GetPlayerName(playerid, sendername, sizeof(sendername)); printf("[Comando] %s [ID: %d]: %s",sendername,playerid,cmdtext); cmd = strtok(cmdtext, idx); //comando de jugador normal if (strcmp("/stats", cmdtext, true, 10) == 0) { format(string,sizeof(string),"Muertes: %d - Asesinatos: %d",AccountInfo[playerid][aMuertes],AccountInfo[playerid][aAsesinatos]); SendClientMessage(playerid,COLOR_GREEN,string); return 1; } if(strcmp(cmd, "/reportar", true) == 0) { new razon[256]; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "Usa: /reportar [ID] [Razon]"); return 1; } giveplayerid = strval(cmd); razon = strrest(cmdtext,idx); if(!strlen(razon)) { SendClientMessage(playerid,COLOR_WHITE,"Usa: /reportar [ID] [Razon]"); return 1; } if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); SendClientMessage(playerid,COLOR_ADMIN,"Tu reporte ha sido enviado a los administradores conectados."); SendClientMessage(playerid,COLOR_ADMIN,"Recuerda que los reportes falsos son motivos de expulsiуn."); SendClientMessage(playerid,COLOR_ADMIN,"No vuelvas a repetir tu reporte o lo tomaremos como flood y seras sancionado."); format(string,sizeof(string),"* AdminAdv: %s [ID: %d] reportу a %s [ID: %d]. Razуn: %s",sendername,playerid,giveplayer,giveplayerid,razon); AdminChat(COLOR_ADMIN,string,1); } else { format(string, sizeof(string), "A quien esperas reportar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/duda", true) == 0) { new duda[256]; duda = strrest(cmdtext,idx); if(!strlen(duda)) { SendClientMessage(playerid, COLOR_GREEN, "Usa: /duda [Pregunta]"); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); SendClientMessage(playerid,COLOR_ADMIN,"Su pregunta a sido enviada a los administradores."); format(string,sizeof(string),"* AdminAdv: Pregunta de %s [ID: %d]: %s",sendername,playerid,duda); AdminChat(COLOR_ADMIN,string,1); return 1; } if(strcmp(cmd, "/admins", true) == 0) { SendClientMessage(playerid,0xFFFFFFAA,"____________________[Admins]____________________"); for(new player=0; player<MAX_PLAYERS; player++) { if(AccountInfo[player][aAdmin] > 0) { new servicio[256] = "Fuera Servicio"; GetPlayerName(player, sendername, sizeof(sendername)); if(adminservicio[player] == 1) { servicio = "En Servicio"; } format(string,sizeof(string),"%s [ID: %d] Nivel: %d [%s]",sendername,player,AccountInfo[player][aAdmin],servicio); SendClientMessage(playerid,COLOR_ADMIN,string); } } return 1; } //Comandos de admin "COLOR_ADMIN" if(AccountInfo[playerid][aAdmin] > 0) { //nivel 1 //ayuda de los admin if(strcmp(cmd,"/admincmd",true) == 0) { SendClientMessage(playerid,COLOR_ADMIN,"____________________[Sistema De Admin - Nombre de su servidor]____________________"); SendClientMessage(playerid,COLOR_WHITE,"* /congelar | /descongelar | /anuncio | /anuncio2 | /admincmd | /base | /ac"); SendClientMessage(playerid,COLOR_WHITE,"* /novigilar | /vigilarcarro | /vigilar | /servicio | /dejarservicio | /limpiarchat | /dc | /expulsar"); if(AccountInfo[playerid][aAdmin] >= 2)//nivel 2 { SendClientMessage(playerid,COLOR_WHITE,"* /explotar | /bombardear | /desarmar | /bofetear | /matar | /curar | /blindar | /ir | /traer"); } if(AccountInfo[playerid][aAdmin] >= 3)//nivel 1337 { SendClientMessage(playerid,COLOR_WHITE,"* /ponerburbuja | /silenciar | /desilenciar | /bloquear | /desbloquear | /quitardinero"); } if(AccountInfo[playerid][aAdmin] >= 4)//nivel 1337 { SendClientMessage(playerid,COLOR_WHITE,"* /vestir | /ban | /carcel | /dardinero | /automenu | /armamenu"); } if(AccountInfo[playerid][aAdmin] >= 1337)//nivel 1337 { SendClientMessage(playerid,COLOR_WHITE,"* /gmx | /desbanear | /detenerservidor | /jetpack | /clima"); } if(AccountInfo[playerid][aAdmin] == 1338)//admin lider { SendClientMessage(playerid,COLOR_WHITE,"* /haceradmin"); } return 1; } //chat de admins if(strcmp(cmd, "/ac", true) == 0) { new mensaje[256]; mensaje = strrest(cmdtext,idx); if(!strlen(mensaje)) { SendClientMessage(playerid,COLOR_GREEN,"Usa: /ac [Mensaje]"); return 1; } format(string,sizeof(string),"Admin %s Dice: %s",sendername,mensaje); AdminChat(COLOR_WHITE,string,1); return 1; } //expulsar if(strcmp(cmd, "/expulsar", true) == 0) { new razon[256]; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid,COLOR_GREEN, "* Usa: /expulsar [ID] [Razon]"); return 1; } giveplayerid = strval(cmd); razon = strrest(cmdtext,idx); if(!strlen(razon)) { SendClientMessage(playerid,COLOR_GREEN,"Usa: /expulsar [ID] [Razon]"); return 1; } if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string),"* AdminCmd: %s Ha sido expulsado por: %s. Razon: %s",giveplayer, sendername, razon); SendClientMessageToAll(COLOR_ADMIN,string); Kick(strval(cmd)); } else { format(string, sizeof(string), "A quien esperas expulsar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp( cmd, "/dc", true ) == 0 ) { new vid = GetPlayerVehicleID(playerid); DestroyVehicle (vid); format(string, sizeof(string), "Vehiculo destruido, ID: %d",vid); SendClientMessage(playerid,COLOR_WHITE,string); return 1; } //congelar y descongelar if(strcmp(cmd, "/congelar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid,COLOR_GREEN,"* Usa: /congelar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); TogglePlayerControllable(strval(cmd),0); format(string,sizeof(string),"* Has congelado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Ha sido congelado por: %s!",giveplayer, sendername); SendClientMessageToAll(COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas congelar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/descongelar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /descongelar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); TogglePlayerControllable(strval(cmd),1); format(string,sizeof(string),"* Has descongelado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Ha sido descongelado por: %s!",giveplayer, sendername); SendClientMessageToAll(COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas descongelar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmdtext, "/base", true) == 0) { TeleportPlayer(playerid,1265.4495,-2047.3251,59.2685); SetPlayerInterior(playerid,0); return 1; } if(strcmp(cmd, "/anuncio", true) == 0) { SendClientMessageToAll(COLOR_GREEN,"|_____________[Anuncio]_____________|"); SendClientMessageToAll(COLOR_GREEN,cmdtext[9]); return 1; } if(strcmp(cmd, "/anuncio2", true) == 0) { SendClientMessageToAll(COLOR_GREEN,cmdtext[10]); return 1; } if(strcmp(cmd, "/limpiarchat", true) == 0) { for(new i=0; i<99; i++) { SendClientMessageToAll(COLOR_WHITE," "); } SendClientMessageToAll(COLOR_ADMIN,"AdminCmd: La Pantalla ha sido limpiada por un admin"); return 1; } //vigilar if(strcmp(cmd, "/vigilar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /vigilar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, giveplayerid); SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid)); gVigiladoID[playerid] = giveplayerid; gVigiladoType[playerid] = ADMIN_SPEC_TYPE_PLAYER; format(string,sizeof(string),"* Estas vigilando a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas vigilar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/vigilarcarro", true) == 0) { new carrovigilado; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /vigilarcarro [ID Del Vehiculo]"); return 1; } carrovigilado = strval(cmd); if(carrovigilado < MAX_VEHICLES) { TogglePlayerSpectating(playerid, 1); PlayerSpectateVehicle(playerid, carrovigilado); gVigiladoID[playerid] = carrovigilado; gVigiladoType[playerid] = ADMIN_SPEC_TYPE_VEHICLE; format(string,sizeof(string),"* Estas vigilando el auto ID: %d!",carrovigilado); SendClientMessage(playerid,COLOR_ADMIN,string); } return 1; } if(strcmp(cmd, "/novigilar", true) == 0) { TogglePlayerSpectating(playerid, 0); gVigiladoID[playerid] = INVALID_PLAYER_ID; gVigiladoType[playerid] = ADMIN_SPEC_TYPE_NONE; SendClientMessage(playerid,COLOR_ADMIN,"* Ya no estas vigilando"); return 1; } if(strcmp(cmd, "/servicio", true) == 0) { if(adminservicio[playerid] == 1) { SendClientMessage(playerid,COLOR_ADMIN,"* Ya estas de servicio"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); SendClientMessage(playerid,COLOR_ADMIN,"* Ahora estas de servicio"); format(string, sizeof(string), "Admin %s Ahora esta de servicio", sendername); SendClientMessageToAll(COLOR_ADMIN,string); adminservicio[playerid] = 1; return 1; } if(strcmp(cmd, "/dejarservicio", true) == 0) { if(adminservicio[playerid] == 0) { SendClientMessage(playerid,COLOR_ADMIN,"* No estas de servicio"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); SendClientMessage(playerid,COLOR_ADMIN,"* Ahora estas fuera de servicio"); format(string, sizeof(string), "Admin %s Ahora esta fuera de servicio", sendername); SendClientMessageToAll(COLOR_ADMIN,string); adminservicio[playerid] = 0; return 1; } } if(AccountInfo[playerid][aAdmin] >= 2)//nivel 2 { if(strcmp(cmd, "/desarmar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /desarmar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); ResetPlayerWeapons(strval(cmd)); format(string,sizeof(string),"* Has desarmado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Te ha confiscado las armas!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas desarmar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/explotar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /explotar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new Float:Pos2[3]; GetPlayerPos(strval(cmd),Pos2[0],Pos2[1],Pos2[2]); SetPlayerPos(strval(cmd),Pos2[0],Pos2[1],Pos2[2]); CreateExplosion(Pos2[0],Pos2[1],Pos2[2],1,40); format(string,sizeof(string),"* Has descuartizado a %s con una explosion!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: Has perido una pierna por una mina antipersonal puesta por: %s!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas mutilar con una mina si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/bombardear", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /bombardear [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new Float:Pos2[3]; GetPlayerPos(strval(cmd),Pos2[0],Pos2[1],Pos2[2]); SetPlayerPos(strval(cmd),Pos2[0],Pos2[1],Pos2[2]); CreateExplosion(Pos2[0],Pos2[1],Pos2[2],7,200); format(string,sizeof(string),"* Has bombardeado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: Has sido descuartizado por una bomba puesta por: %s!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas bombardear si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/bofetear", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /bofetear [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new Float:Pos2[3]; GetPlayerPos(strval(cmd),Pos2[0],Pos2[1],Pos2[2]); SetPlayerPos(strval(cmd),Pos2[0],Pos2[1],Pos2[2]+10); PlayerPlaySound(strval(cmd), 1190, 0.0, 0.0, 0.0); format(string,sizeof(string),"* Has bofeteado a %s en la cara!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s te fofeteo por tu comportamiento!",sendername,giveplayer); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas bofetear si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/matar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /matar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); OnPlayerDeath(giveplayerid,playerid,0); OnPlayerSpawn(giveplayerid); format(string,sizeof(string),"* Has matado a %s.",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Te mato!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas matar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/curar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /curar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerHealth(strval(cmd),100); format(string,sizeof(string),"* Has curado a %s.",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Te Curo!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas curar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/blindar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /blindar [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerArmour(strval(cmd),100); format(string,sizeof(string),"* Has blindado a %s.",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Te regalo un chaleco antibalas!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas blindar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/ir", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /ir [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new Float:Pos[3]; GetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]); TeleportPlayer(playerid,Pos[0],Pos[1],Pos[2]); new interior = GetPlayerInterior(giveplayerid); SetPlayerInterior(playerid,interior); format(string,sizeof(string),"* Has ido a donde esta %s.",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Te esta vigilado!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A donde esperas ir si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/traer", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /traer [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new Float:Pos2[3]; GetPlayerPos(playerid,Pos2[0],Pos2[1],Pos2[2]); TeleportPlayer(strval(cmd),Pos2[0],Pos2[1],Pos2[2]); new interior = GetPlayerInterior(playerid); SetPlayerInterior(giveplayerid,interior); format(string,sizeof(string),"* Has traido a %s.",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: Has sido llamado por: %s!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas traer si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } } if(AccountInfo[playerid][aAdmin] >= 3)//nivel 3 { if(strcmp(cmd,"/ponerburbuja",true)==0) { new mensaje[256]; cmd = strtok(cmdtext,idx); if(!strlen(cmd)) { SendClientMessage(playerid,COLOR_WHITE,"Usa: /ponerburbuja [id] [mensaje]"); return 1; } giveplayerid = strval(cmd); mensaje = strrest(cmdtext,idx); if(!strlen(mensaje)) { SendClientMessage(playerid,COLOR_WHITE,"Usa: /ponerburbuja [id] [mensaje]"); return 1; } if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerChatBubble(strval(cmd), mensaje, COLOR_WHITE, 100, 60000); format(string,sizeof(string),"Ahora la burbuja de chat de %s dice: %s",giveplayer,mensaje); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"El %s cambio tu burbuja de chat por: %s",sendername,mensaje); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien le esperas cambiar la burbuja de chat si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } if(strcmp(cmd, "/quitardinero", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /quitardinero [ID]"); return 1; } giveplayerid = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); GivePlayerMoney(strval(cmd),-GetPlayerMoney(strval(cmd))); format(string,sizeof(string),"* Le has quitado el dinero a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string,sizeof(string),"* AdminCmd: %s Te quto todo el dinero!",sendername); SendClientMessage(strval(cmd),COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien le esperas quitar el dinero si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } //silenciar if(strcmp(cmd, "/silenciar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /silenciar [ID]"); return 1; } giveplayerid = strval(cmd); if(AccountInfo[giveplayerid][aSilencio] == 1) return SendClientMessage(playerid,COLOR_WHITE,"Ya Esta Silenciado"); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); AccountInfo[giveplayerid][aSilencio] = 1; format(string,sizeof(string),"* Has silenciado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s Te ha silenciado",sendername); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas silenciar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } //desilenciar if(strcmp(cmd, "/desilenciar", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /desilenciar [ID]"); return 1; } giveplayerid = strval(cmd); if(AccountInfo[giveplayerid][aSilencio] == 0) return SendClientMessage(playerid,COLOR_WHITE,"No esta Silenciado"); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); AccountInfo[giveplayerid][aSilencio] = 0; format(string,sizeof(string),"* Has desilenciado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s Te ha desilenciado",sendername); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas desilenciar si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } //bloquear if(strcmp(cmd, "/bloquear", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /bloquear [ID]"); return 1; } giveplayerid = strval(cmd); if(AccountInfo[giveplayerid][aBloqueado] == 1) return SendClientMessage(playerid,COLOR_WHITE,"Ya esta bloqueado"); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); AccountInfo[giveplayerid][aBloqueado] = 1; format(string,sizeof(string),"* Has bloqueado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s Te ha bloqueado los comandos",sendername); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas bloquear si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } //desbloquear if(strcmp(cmd, "/desbloquear", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /desbloquear [ID]"); return 1; } giveplayerid = strval(cmd); if(AccountInfo[giveplayerid][aBloqueado] == 0) return SendClientMessage(playerid,COLOR_WHITE,"No esta bloqueado"); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); AccountInfo[giveplayerid][aBloqueado] = 0; format(string,sizeof(string),"* Has desbloqueado a %s!",giveplayer); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s Te ha desbloqueado los comandos",sendername); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien esperas desbloquear si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } } if(AccountInfo[playerid][aAdmin] >= 4)//nivel 4 { //carcel if(strcmp(cmd, "/carcel", true) == 0) { new tiempo; new razon[256]; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid,COLOR_ADMIN,"Usa: /carcel [ID] [Tiempo en minutos] [Razon]"); return 1; } giveplayerid = strval(cmd); cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid,COLOR_ADMIN,"Usa: /carcel [ID] [Tiempo en minutos] [Razon]"); return 1; } tiempo = strval(cmd); razon = strrest(cmdtext,idx); if(!strlen(razon)) { SendClientMessage(playerid,COLOR_ADMIN,"Usa: /carcel [ID] [Tiempo en minutos] [Razon]"); return 1; } if(IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid,giveplayer, sizeof(giveplayer)); GetPlayerName(playerid,sendername, sizeof(sendername)); format(string, sizeof(string),"* Encarcelaste a %s por: %s",giveplayer,razon); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string),"AdmCmd: Fuiste encarcelado por: %s Razon: %s",sendername,razon); SendClientMessage(giveplayerid,COLOR_ADMIN,string); format(string, sizeof(string),"AdmCmd: %s fue encarcelado por: %s, Razon: %s",giveplayer,sendername,razon); SendClientMessageToAll(COLOR_ADMIN,string); ResetPlayerWeapons(giveplayerid); AccountInfo[giveplayerid][aCarcel] = 1; AccountInfo[giveplayerid][aTiempoCarcel] = tiempo*60; AccountInfo[giveplayerid][aBloqueado] = 1; SetPlayerInterior(giveplayerid, 6); SetPlayerPos(giveplayerid, 264.6288,77.5742,1001.0391); format(string, sizeof(string),"AdminMsg: Estas castigado por %d minutos.",tiempo); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } return 1; } if(strcmp(cmd, "/dardinero", true) == 0) { new moneys; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /dardinero [id del jugador] [cantidad]"); return 1; } giveplayerid = strval(cmd); cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /dardinero [id del jugador] [cantidad]"); return 1; } moneys = strval(cmd); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); GivePlayerMoney(giveplayerid, moneys); format(string, sizeof(string), "Le has dado $%d a %s[ID: %d]",moneys,giveplayer,giveplayerid); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s [ID: %d] Te dio $%d",sendername,playerid,moneys); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } else { format(string, sizeof(string), "A quien le esperas dar dinero si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } //forsar un skin if(strcmp(cmd, "/vestir", true) == 0) { new skin; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid,COLOR_ADMIN,"Usa: /vestir [ID] [ID del Skin]"); return 1; } giveplayerid = strval(cmd); cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid,COLOR_ADMIN,"Usa: /vestir [ID] [ID del Skin]"); return 1; } skin = strval(cmd); if(IsPlayerConnected(giveplayerid)) { if (skin == 0) { GetPlayerName(giveplayerid,giveplayer, sizeof(giveplayer)); GetPlayerName(playerid,sendername, sizeof(sendername)); SetPlayerSkin(giveplayerid,0); format(string,sizeof(string),"* Has vestido a %s con el skin %d!",giveplayer,skin); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s Te ha puesto el skin %d",sendername,skin); SendClientMessage(giveplayerid,COLOR_ADMIN,string); return 1; } #define MAX_BAD_SKINS 22 new badSkins[MAX_BAD_SKINS] = { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289 }; if (skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_GREEN, "* id de skin invalida"); for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skin == badSkins[i]) return SendClientMessage(playerid, COLOR_GREEN, "* id de skin invalida"); } #undef MAX_BAD_SKINS GetPlayerName(giveplayerid,giveplayer, sizeof(giveplayer)); GetPlayerName(playerid,sendername, sizeof(sendername)); SetPlayerSkin(giveplayerid,skin); format(string,sizeof(string),"* Has vestido a %s con el skin %d!",giveplayer,skin); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s Te ha puesto el skin %d",sendername,skin); SendClientMessage(giveplayerid,COLOR_ADMIN,string); } return 1; } if(strcmp(cmd, "/ban", true) == 0) { new razon[256]; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_GREEN, "* Usa: /ban [ID] [Razon]"); return 1; } giveplayerid = strval(cmd); razon = strrest(cmdtext,idx); if(!strlen(razon)) { SendClientMessage(playerid,COLOR_ADMIN,"Usa: /ban [ID] [Razon]"); return 1; } if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string,sizeof(string),"* AdminCmd: %s Ha sido baneado por: %s. Razon: %s",giveplayer, sendername, razon); SendClientMessageToAll(COLOR_ADMIN,string); Ban(strval(cmd)); } else { format(string, sizeof(string), "A quien esperas banear si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } //menus if ( strcmp( cmdtext, "/automenu", true) == 0 ) { ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); return 1; } if(strcmp(cmdtext, "/armamenu", true) == 0) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); return 1; } } if(AccountInfo[playerid][aAdmin] >= 1337) { if(strcmp(cmd, "/detenerservidor", true) == 0) { SendRconCommand("exit"); return 1; } if(strcmp(cmd, "/desbanear", true) == 0) { SendRconCommand("reloadbans"); return 1; } if(strcmp(cmd, "/gmx", true) == 0) { SendRconCommand("gmx"); return 1; } if (strcmp(cmdtext, "/jetpack", true) == 0) { SetPlayerSpecialAction(playerid, 2); SendClientMessage(playerid,COLOR_ADMIN,"* Disfruta de tu jetpack"); return 1; } if (strcmp("/clima", cmdtext, true) == 0) { ShowPlayerDialog(playerid,29, DIALOG_STYLE_LIST, "Climas Disponibles", "Cielo Azul\nTormenta\nNublado\nCalor Abrasante\nLluvia\nTormenta De Arena\nNoche Nublada\nCielo Blanco\nCielo Blanco Con Nubes\nCielo Rosa\nCielo Rojo\nCielo Morado\nCielo Negro\nCielo Naranja\nCielo Azul", "Aceptar", "Cancelar"); return 1; } } if(AccountInfo[playerid][aAdmin] == 5) { //hacer admin if(strcmp(cmd, "/haceradmin", true) == 0) { new nivel; cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /haceradmin [ID] [Nivel]"); return 1; } giveplayerid = strval(cmd); if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_WHITE, "No te puedes dar nivel tu mismo"); cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, COLOR_WHITE, "Usa: /haceradmin [ID] [Nivel]"); return 1; } nivel = strval(cmd); if(nivel >= 1337) return SendClientMessage(playerid,COLOR_WHITE,"Solo el dueсo del servidor puede hacer admins de nivel 1337 o 1338"); if(AccountInfo[giveplayerid][aAdmin] == nivel) return SendClientMessage(playerid,COLOR_WHITE,"Ya es admin de ese nivel"); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); AccountInfo[giveplayerid][aAdmin] = nivel; format(string,sizeof(string),"* Has hecho admin a %s nivel %d",giveplayer,nivel); SendClientMessage(playerid,COLOR_ADMIN,string); format(string, sizeof(string), "AdminCmd: %s Te ha hecho admin nivel %d",sendername,nivel); SendClientMessage(giveplayerid,COLOR_ADMIN,string); printf("[Admin] %s [ID: %d] hiso admin a %s [ID: %d] nivel %d",sendername,playerid,giveplayer,giveplayerid,nivel); } else { format(string, sizeof(string), "A quien esperas hacer admin si el ID %d No esta conectado.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } } return 0; } public OnPlayerStateChange(playerid, newstate, oldstate) { new string[256]; if (newstate==PLAYER_STATE_DRIVER) { if(oldstate == PLAYER_STATE_ONFOOT) { format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~g~%s",Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]); GameTextForPlayer(playerid, string, 2000, 5); } MessageForDriver(playerid); } if(newstate == PLAYER_STATE_PASSENGER) { if(oldstate == PLAYER_STATE_ONFOOT) { format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~g~%s",Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]); GameTextForPlayer(playerid, string, 2000, 5); } } return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if( admin1 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { TeleportPlayer(playerid,229.8518,1114.2980,1080.9922); SetPlayerInterior(playerid,5); SendClientMessage(playerid, COLOR_WHITE, "* Bienvenido"); } else { SendClientMessage(playerid, COLOR_WHITE, "* Cerrado"); } } if( admin2 == pickupid ) { TeleportPlayer(playerid,1129.8694,-2037.0734,69.0078); SetPlayerInterior(playerid,0); } if( admin3 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { OnPlayerCommandText(playerid,"/admincmd"); } } if( admin4 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { OnPlayerCommandText(playerid,"/vigilar"); } } if( admin5 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { OnPlayerCommandText(playerid,"/vigilarcarro"); } } if( admin6 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { OnPlayerCommandText(playerid,"/servicio"); } } if( admin7 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { OnPlayerCommandText(playerid,"/dejarservicio"); } } if( admin8 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { SetPlayerSkin(playerid,217); } } if( admin9 == pickupid ) { if(AccountInfo[playerid][aAdmin] > 0) { AccountInfo[playerid][aBloqueado] = 0; } } } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { new x = 0; while(x!=MAX_PLAYERS) { if( IsPlayerConnected(x) && GetPlayerState(x) == PLAYER_STATE_SPECTATING && gVigiladoID[x] == playerid && gVigiladoType[x] == ADMIN_SPEC_TYPE_PLAYER ) { SetPlayerInterior(x,newinteriorid); } x++; } } public OnPlayerUpdate(playerid) { if(IsPlayerConnected(playerid)) { if(AccountInfo[playerid][aLogged] == 1) { new string3[128]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); format(string3, sizeof(string3), ACCOUNTS_FOLDER, playername3); new ip[20]; GetPlayerIp(playerid,ip,sizeof(ip)); new File: hFile = fopen(string3, io_write); if (hFile) { new var[128]; format(var, 128, "Password=%s\n", AccountInfo[playerid][aPassword]);fwrite(hFile, var); format(var, 128, "IP=%s\n",ip);fwrite(hFile, var); format(var, 128, "Admin=%d\n", AccountInfo[playerid][aAdmin]);fwrite(hFile, var); format(var, 128, "Muertes=%d\n", AccountInfo[playerid][aMuertes]);fwrite(hFile, var); format(var, 128, "Asesinatos=%d\n", AccountInfo[playerid][aAsesinatos]);fwrite(hFile, var); format(var, 128, "Dinero=%d\n",GetPlayerMoney(playerid));fwrite(hFile, var); format(var, 128, "Carcel=%d\n", AccountInfo[playerid][aCarcel]);fwrite(hFile, var); format(var, 128, "TiempoCarcel=%d\n", AccountInfo[playerid][aTiempoCarcel]);fwrite(hFile, var); format(var, 128, "Bloqueado=%d\n", AccountInfo[playerid][aBloqueado]);fwrite(hFile, var); format(var, 128, "Silencio=%d\n", AccountInfo[playerid][aSilencio]);fwrite(hFile, var); fclose(hFile); } } } return 1; } public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[] ) { if (response == 1) { switch ( dialogid ) { case 1 : { switch ( listitem ) { case 0 : ShowPlayerDialog( playerid, 2, DIALOG_STYLE_LIST, "Cuerpo a cuerpo", "Puсo americano\nPalo de golf\nPorra de policia\nCuchillo\nBate de beisboll\nPala\nPalo de billar\nKatana\nMotosierra\nConsolador rosa\nMini consolador blanco\nConsolador blanco\nMini consolador negro\nRamo de flores\nBaston\nAtras", "Aceptar", "Cancelar" ); case 1 : ShowPlayerDialog( playerid, 3, DIALOG_STYLE_LIST, "Granadas", "Granada\nGranada de humo\nCoctel molotov\nAtras", "Aceptar", "Cancelar" ); case 2 : ShowPlayerDialog( playerid, 4, DIALOG_STYLE_LIST, "Pistolas", "9MM\nPistola con silenciador\nDesert eagle\nAtras", "Aceptar", "Cancelar" ); case 3 : ShowPlayerDialog( playerid, 5, DIALOG_STYLE_LIST, "Escopetas", "Escopeta\nEscopeta recortada\nSPAZ\nAtras", "Aceptar", "Cancelar" ); case 4 : ShowPlayerDialog( playerid, 6, DIALOG_STYLE_LIST, "Fusiles", "UZI\nMP5\nAK47\nM4\nTEC9\nRifle de caza\nFrancotirador\nAtras", "Aceptar", "Cancelar" ); case 5 : ShowPlayerDialog( playerid, 7, DIALOG_STYLE_LIST, "Armas pesadas", "Lanzamisiles\nLanzagranadas\nLanzallamas\nMinigun\nAtras", "Aceptar", "Cancelar" ); case 6 : ShowPlayerDialog( playerid, 8, DIALOG_STYLE_LIST, "Explosivos", "C4 explosivo\nDetonador\nAtras", "Aceptar", "Cancelar" ); case 7 : ShowPlayerDialog( playerid, 9, DIALOG_STYLE_LIST, "Accesorios", "Spray\nExtintor\nCamara\nVisor nocturno\nVisor termico\nParacaidas\nAtras", "Aceptar", "Cancelar" ); } } case 2 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 1 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Puсo americano!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 2 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Palo de golf!"); } if ( listitem == 2 ) { GivePlayerWeapon(playerid, 3 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Porra de policia!"); } if ( listitem == 3 ) { GivePlayerWeapon(playerid, 4 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Cuchillo!"); } if ( listitem == 4 ) { GivePlayerWeapon(playerid, 5 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Bate de beisboll!"); } if ( listitem == 5 ) { GivePlayerWeapon(playerid, 6 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Pala!"); } if ( listitem == 6 ) { GivePlayerWeapon(playerid, 7 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Palo de billar!"); } if ( listitem == 7 ) { GivePlayerWeapon(playerid, 8 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Katana!"); } if ( listitem == 8 ) { GivePlayerWeapon(playerid, 9 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Motosierra!"); } if ( listitem == 9 ) { GivePlayerWeapon(playerid, 10 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Consolador rosa!"); } if ( listitem == 10 ) { GivePlayerWeapon(playerid, 11 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Mini consolador blanco!"); } if ( listitem == 11 ) { GivePlayerWeapon(playerid, 12 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Consolador blanco!"); } if ( listitem == 12 ) { GivePlayerWeapon(playerid, 13 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Mini consolador negro!"); } if ( listitem == 13 ) { GivePlayerWeapon(playerid, 14 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Ramo de flores!"); } if ( listitem == 14 ) { GivePlayerWeapon(playerid, 15 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Baston!"); } if ( listitem == 15 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 3 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 16 , 100); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Granada!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 17 , 100); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Granada de humo!"); } if ( listitem == 2 ) { GivePlayerWeapon(playerid, 18 , 100); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Coctel molotov!"); } if ( listitem == 3 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 4 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 22 , 1000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su 9MM!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 23 , 1000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Pistola con silenciador!"); } if ( listitem == 2 ) { GivePlayerWeapon(playerid, 24 , 1000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Desert eagle!"); } if ( listitem == 3 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 5 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 25 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Escopeta!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 26 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Escopeta recortada!"); } if ( listitem == 2 ) { GivePlayerWeapon(playerid, 27 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su SPAZ!"); } if ( listitem == 3 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 6 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 28 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su UZI!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 29 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su MP5!"); } if ( listitem == 2 ) { GivePlayerWeapon(playerid, 30 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su AK47!"); } if ( listitem == 3 ) { GivePlayerWeapon(playerid, 31 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su M4!"); } if ( listitem == 4 ) { GivePlayerWeapon(playerid, 32 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su TEC9!"); } if ( listitem == 5 ) { GivePlayerWeapon(playerid, 33 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Rifle de caza!"); } if ( listitem == 6 ) { GivePlayerWeapon(playerid, 34 , 1000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Francotirador!"); } if ( listitem == 7 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 7 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 35 , 100); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Lanzamisiles!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 36 , 100); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Lanzagranadas!"); } if ( listitem == 2 ) { GivePlayerWeapon(playerid, 37 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Lanzallamas!"); } if ( listitem == 3 ) { GivePlayerWeapon(playerid, 38 , 9500); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Minigun!"); } if ( listitem == 4 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 8 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 39 , 100); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su C4 explosivo!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 40 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Detonador!"); } if ( listitem == 2 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 9 : { if ( listitem == 0 ) { GivePlayerWeapon(playerid, 41 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Spray!"); } if ( listitem == 1 ) { GivePlayerWeapon(playerid, 42 , 5000); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Extintor!"); } if ( listitem == 2 ) { GivePlayerWeapon(playerid, 43 , 50); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Camara!"); } if ( listitem == 3 ) { GivePlayerWeapon(playerid, 44 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Visor nocturno!"); } if ( listitem == 4 ) { GivePlayerWeapon(playerid, 45 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Visor termico!"); } if ( listitem == 5 ) { GivePlayerWeapon(playerid, 46 , 1); SendClientMessage(playerid, COLOR_AZUL, "Disfrute de su Paracaidas!"); } if ( listitem == 6 ) { ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Armas Disponibles", "Cuerpo a cuerpo\nGranadas\nPistolas\nEscopetas\nFusiles\nArmas pesadas\nExplosivos\nAccesorios", "Aceptar", "Cancelar" ); } } case 10 : { switch ( listitem ) { case 0 : ShowPlayerDialog( playerid, 11, DIALOG_STYLE_LIST, "Aviones", "Andromada\nAT-400\nBeagle\nCropduster\nDodo\nHydra\nNevada\nRustler\nShamal\nSkimmer\nStuntplane\nAtras", "Aceptar", "Cancelar" ); case 1 : ShowPlayerDialog( playerid, 12, DIALOG_STYLE_LIST, "Helicopteros", "Cargobob\nHunter\nLeviathan\nMaverick\nNews Maverick\nPolice Maverick\nRaindance\nSeasparrow\nSparrow\nAtras", "Aceptar", "Cancelar" ); case 2 : ShowPlayerDialog( playerid, 13, DIALOG_STYLE_LIST, "Motos", "BF-400\nBike\nBMX\nFaggio\nFCR-900\nFreeway\nMountain Bike\nNRG-500\nPCJ-600\nPizzaboy\nQuad\nSanchez\nWayfarer\nAtras", "Aceptar", "Cancelar" ); case 3 : ShowPlayerDialog( playerid, 14, DIALOG_STYLE_LIST, "Convertibles", "Comet\nFeltzer\nStallion\nWindsor\nAtras", "Aceptar", "Cancelar" ); case 4 : ShowPlayerDialog( playerid, 15, DIALOG_STYLE_LIST, "Industriales", "Benson\nBobcat\nBurrito\nBoxville\nBoxburg\nCement Truck\nDFT-30\nFlatbed\nLinerunner\nMule\nNewsvan\nPacker\nPetrol Tanker\nPony\nRoadtrain\nRumpo\nSadler\nSadler Shit\nTopfun\nTractor\nTrashmaster\nUtility Van\nWalton\nYankee\nYosemite\nAtras", "Aceptar", "Cancelar" ); case 5 : ShowPlayerDialog( playerid, 16, DIALOG_STYLE_LIST, "Lowriders", "Blade\nBroadway\nRemington\nSavanna\nSlamvan\nTahoma\nTornado\nVoodoo\nAtras", "Aceptar", "Cancelar" ); case 6 : ShowPlayerDialog( playerid, 17, DIALOG_STYLE_LIST, "Todoterreno", "Bandito\nBF Injection\nDune\nHuntley\nLandstalker\nMesa\nMonster\nMonster A\nMonster B\nPatriot\nRancher A\nRancher B\nSandking\nAtras", "Aceptar", "Cancelar" ); case 7 : ShowPlayerDialog( playerid, 18, DIALOG_STYLE_LIST, "Servicio Publico", "Ambulance\nBarracks\nBus\nCabbie\nCoach\nCop Bike (HPV-1000)\nEnforcer\nFBI Rancher\nFBI Truck\nFiretruck\nFiretruck LA\nPolice Car (LSPD)\nPolice Car (LVPD)\nPolice Car (SFPD)\nRanger\nRhino\nS.W.A.T\nTaxi\nAtras", "Aceptar", "Cancelar" ); case 8 : ShowPlayerDialog( playerid, 19, DIALOG_STYLE_LIST, "Elegantes", "Admiral\nBloodring Banger\nBravura\nBuccaneer\nCadrona\nClover\nElegant\nElegy\nEmperor\nEsperanto\nFortune\nGlendale Shit\nGlendale\nGreenwood\nHermes\nIntruder\nMajestic\nManana\nMerit\nNebula\nOceanic\nPicador\nPremier\nPrevion\nPrimo\nSentinel\nStafford\nSultan\nSunrise\nTampa\nVincent\nVirgo\nWillard\nWashington\nAtras", "Aceptar", "Cancelar" ); case 9 : ShowPlayerDialog( playerid, 20, DIALOG_STYLE_LIST, "Deportivos", "Alpha\nBanshee\nBlista Compact\nBuffalo\nBullet\nCheetah\nClub\nEuros\nFlash\nHotring Racer\nHotring Racer A\nHotring Racer B\nInfernus\nJester\nPhoenix\nSabre\nSuper GT\nTurismo\nUranus\nZR-350\nAtras", "Aceptar", "Cancelar" ); case 10 : ShowPlayerDialog( playerid, 21, DIALOG_STYLE_LIST, "Vagones", "Moonbeam\nPerenniel\nRegina\nSolair\nStratum\nAtras", "Aceptar", "Cancelar" ); case 11 : ShowPlayerDialog( playerid, 22, DIALOG_STYLE_LIST, "Barcos", "Coastguard\nDinghy\nJetmax\nLaunch\nMarquis\nPredator\nReefer\nSpeeder\nSquallo\nTropic\nAtras", "Aceptar", "Cancelar" ); case 12 : ShowPlayerDialog( playerid, 23, DIALOG_STYLE_LIST, "Trailers", "Article Trailer\nArticle Trailer 2\nArticle Trailer 3\nBaggage Trailer A\nBaggage Trailer B\nFarm Trailer\nFreight Flat Trailer (Train)\nFreight Box Trailer (Train)\nPetrol Trailer\nStreak Trailer (Train)\nStairs Trailer\nUtility Trailer\nAtras", "Aceptar", "Cancelar" ); case 13 : ShowPlayerDialog( playerid, 24, DIALOG_STYLE_LIST, "Carros Unicos", "Baggage\nBrownstreak (Train)\nCaddy\nCamper\nCamper A\nCombine Harvester\nDozer\nDumper\nForklift\nFreight (Train)\nHotknife\nHustler\nHotdog\nKart\nMower\nMr Whoopee\nRomero\nSecuricar\nStretch\nSweeper\nTram\nTowtruck\nTug\nVortex\nAtras", "Aceptar", "Cancelar" ); case 14 : ShowPlayerDialog( playerid, 25, DIALOG_STYLE_LIST, "Radio Control", "RC Bandit\nRC Baron\nRC Raider\nRC Goblin\nRC Tiger\nRC Cam\nAtras", "Aceptar", "Cancelar" ); } } case 11 : { if ( listitem > 10 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 12 : { if ( listitem > 8 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 548, 425, 417, 487, 488, 497, 563, 447, 469 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 13 : { if ( listitem > 12 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 581, 509, 481, 462, 521, 463, 510, 522, 461, 448, 471, 468, 586 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 14 : { if ( listitem > 3 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 480, 533, 439, 555 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 15 : { if ( listitem > 24 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 16 : { if ( listitem > 7 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 536, 575, 534, 567, 535, 566, 576, 412 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 17 : { if ( listitem > 12 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 495 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 18 : { if ( listitem > 17 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 598, 597, 599, 432, 601, 420 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 19 : { if ( listitem > 33 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 20 : { if ( listitem > 19 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 21 : { if ( listitem > 4 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 418, 404, 479, 458, 561 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 22 : { if ( listitem > 9 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 23 : { if ( listitem > 11 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 435, 450, 591, 606, 607, 610, 569, 590, 584, 570, 608, 611 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 24 : { if ( listitem > 23 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 485, 537, 457, 483, 508, 532, 486, 406, 530, 538, 434, 545, 588, 571, 572, 423, 442, 428, 409, 574, 449, 525, 583, 539 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 25 : { if ( listitem > 5 ) return ShowPlayerDialog( playerid, 10, DIALOG_STYLE_LIST, "Vehiculos Disponibles", "Aviones\nHelicopteros\nMotos\nConvertibles\nIndustriales\nLowriders\nTodoterreno\nServicio Publico\nElegantes\nDeportivos\nVagones\nBarcos\nTrailers\nCarros Unicos\nRadio Control", "Aceptar", "Cancelar" ); new model_array[] = { 441, 464, 465, 501, 564, 594 }; return CreatePlayerVehicle( playerid, model_array[ listitem ] ); } case 26 : { if(strlen(inputtext)) { new player[MAX_PLAYER_NAME]; GetPlayerName(playerid, player, 50); new string3[32]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); format(string3, sizeof(string3), ACCOUNTS_FOLDER, playername3); new ip[20]; GetPlayerIp(playerid,ip,sizeof(ip)); new File: hFile = fopen(string3, io_write); AccountInfo[playerid][aMuertes] = 0; AccountInfo[playerid][aAsesinatos] = 0; if (hFile) { strmid(AccountInfo[playerid][aPassword], inputtext, 0, strlen(inputtext), 255); new var[128]; format(var, 128, "Password=%s\n", AccountInfo[playerid][aPassword]);fwrite(hFile, var); format(var, 128, "IP=%s\n",ip);fwrite(hFile, var); format(var, 128, "Admin=%d\n", AccountInfo[playerid][aAdmin]);fwrite(hFile, var); format(var, 128, "Muertes=%d\n", AccountInfo[playerid][aMuertes]);fwrite(hFile, var); format(var, 128, "Asesinatos=%d\n", AccountInfo[playerid][aAsesinatos]);fwrite(hFile, var); format(var, 128, "Dinero=%d\n", AccountInfo[playerid][aDinero]);fwrite(hFile, var); format(var, 128, "Carcel=%d\n", AccountInfo[playerid][aCarcel]);fwrite(hFile, var); format(var, 128, "TiempoCarcel=%d\n", AccountInfo[playerid][aTiempoCarcel]);fwrite(hFile, var); format(var, 128, "Bloqueado=%d\n", AccountInfo[playerid][aBloqueado]);fwrite(hFile, var); format(var, 128, "Silencio=%d\n", AccountInfo[playerid][aSilencio]);fwrite(hFile, var); fclose(hFile); } printf("%s se ha registrado.",playername3); SendClientMessage(playerid, COLOR_GREEN, "* Te has registrado. Ahora puedes jugar"); new girismsg[256]; format(girismsg,256,"Bienbenido a SA-FR\n\nGracias por preferirnos %s\n\nEscribe tu contraseсa:",playername3); ShowPlayerDialog(playerid,27,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Salir"); register[playerid] = 0; login[playerid] = 1; } else if(!strlen(inputtext)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); new kayitmsg[256]; format(kayitmsg,256,"Bienbenido a SA-FR\n\n%s Registrate si quieres jugar\n\nEscribe tu contraseсa:",name); ShowPlayerDialog(playerid,26,DIALOG_STYLE_INPUT,"Registrar",kayitmsg,"Registrar","Salir"); register[playerid] = 1; login[playerid] = 0; } } case 27 : { new string2[128]; new playername2[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername2, sizeof(playername2)); format(string2, sizeof(string2), ACCOUNTS_FOLDER, playername2); new File: UserFile = fopen(string2, io_read); if ( UserFile ) { new PassData[256]; new keytmp[256], valtmp[256]; fread( UserFile , PassData , sizeof( PassData ) ); keytmp = ini_GetKey( PassData ); if( strcmp( keytmp , "Password" , true ) == 0 ) { valtmp = ini_GetValue( PassData ); strmid(AccountInfo[playerid][aPassword], valtmp, 0, strlen(valtmp)-1, 255); } if(strcmp(AccountInfo[playerid][aPassword],inputtext, true ) == 0) { if(strlen(inputtext)) { for(new p = 0; p < strlen(AccountInfo[playerid][aPassword]); p++) { inputtext[p] = '?'; } AccountInfo[playerid][aLogged] = 1; register[playerid] = 0; login[playerid] = 0; printf("%s Ha logeado.",playername2); format(string2, sizeof(string2), "%s Se ha unido al servidor", playername2); SendClientMessageToAll(COLOR_WHITE, string2); new key[ 256 ] , val[ 256 ]; new Data[256]; while ( fread( UserFile , Data , sizeof( Data ) ) ) { key = ini_GetKey( Data ); if( strcmp( key , "Admin" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aAdmin] = strval( val ); } if( strcmp( key , "Muertes" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aMuertes] = strval( val ); } if( strcmp( key , "Asesinatos" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aAsesinatos] = strval( val ); } if( strcmp( key , "Dinero" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aDinero] = strval( val ); } if( strcmp( key , "Carcel" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aCarcel] = strval( val ); } if( strcmp( key , "TiempoCarcel" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aTiempoCarcel] = strval( val ); } if( strcmp( key , "Bloqueado" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aBloqueado] = strval( val ); } if( strcmp( key , "Silencio" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aSilencio] = strval( val ); } } fclose(UserFile); GivePlayerMoney(playerid,AccountInfo[playerid][aDinero]); SetPlayerScore(playerid,0 + AccountInfo[playerid][aAsesinatos]); if (AccountInfo[playerid][aAdmin] > 0) { new string[256]; format(string,sizeof(string),"* Has logueado como admin nivel %d",AccountInfo[playerid][aAdmin]); SendClientMessage(playerid,COLOR_ADMIN,string); SetPlayerSkin(playerid,217); TeleportPlayer(playerid,1265.4495,-2047.3251,59.2685); } if (AccountInfo[playerid][aCarcel] == 1) { SetPlayerInterior(playerid,6); TeleportPlayer(playerid,264.6288,77.5742,1001.0391); SendClientMessage(playerid,COLOR_ADMIN,"AdminMsg: Condena incompleta, Sigue tu condena"); } } } else { if(strlen(inputtext)) { new girismsg[256]; printf("%s Erro en su contraseсa.",playername2); format(girismsg,256,"Contraseсa Incorrecta\n\nPor favor escribe tu contraseсa:"); ShowPlayerDialog(playerid,28,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Salir"); login[playerid] = 1; register[playerid] = 0; fclose(UserFile); return 1; } } if(!strlen(inputtext)) { new girismsg[256]; printf("%s No puso su contraseсa.",playername2); format(girismsg,256,"No escribiste tu contraseсa\n\nPor favor escribe tu contraseсa:"); ShowPlayerDialog(playerid,28,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Salir"); login[playerid] = 1; register[playerid] = 0; fclose(UserFile); return 1; } } } case 28 : { new string2[128]; new playername2[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername2, sizeof(playername2)); format(string2, sizeof(string2), ACCOUNTS_FOLDER, playername2); new File: UserFile = fopen(string2, io_read); if ( UserFile ) { new PassData[256]; new keytmp[256], valtmp[256]; fread( UserFile , PassData , sizeof( PassData ) ); keytmp = ini_GetKey( PassData ); if( strcmp( keytmp , "Password" , true ) == 0 ) { valtmp = ini_GetValue( PassData ); strmid(AccountInfo[playerid][aPassword], valtmp, 0, strlen(valtmp)-1, 255); } if(strcmp(AccountInfo[playerid][aPassword],inputtext, true ) == 0) { if(strlen(inputtext)) { for(new p = 0; p < strlen(AccountInfo[playerid][aPassword]); p++) { inputtext[p] = '?'; } AccountInfo[playerid][aLogged] = 1; register[playerid] = 0; login[playerid] = 0; printf("%s Ha logeado.",playername2); format(string2, sizeof(string2), "%s Se ha unido al servidor", playername2); SendClientMessageToAll(COLOR_WHITE, string2); new key[ 256 ] , val[ 256 ]; new Data[256]; while ( fread( UserFile , Data , sizeof( Data ) ) ) { key = ini_GetKey( Data ); if( strcmp( key , "Admin" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aAdmin] = strval( val ); } if( strcmp( key , "Muertes" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aMuertes] = strval( val ); } if( strcmp( key , "Asesinatos" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aAsesinatos] = strval( val ); } if( strcmp( key , "Dinero" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aDinero] = strval( val ); } if( strcmp( key , "Carcel" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aCarcel] = strval( val ); } if( strcmp( key , "TiempoCarcel" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aTiempoCarcel] = strval( val ); } if( strcmp( key , "Bloqueado" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aBloqueado] = strval( val ); } if( strcmp( key , "Silencio" , true ) == 0 ) { val = ini_GetValue( Data ); AccountInfo[playerid][aSilencio] = strval( val ); } } fclose(UserFile); GivePlayerMoney(playerid,AccountInfo[playerid][aDinero]);//da el dinero SetPlayerScore(playerid,0 + AccountInfo[playerid][aAsesinatos]);//da la puntuacion igual a los asesinatos if (AccountInfo[playerid][aAdmin] > 0) { new string[256]; format(string,sizeof(string),"* Has logueado como admin nivel %d",AccountInfo[playerid][aAdmin]); SendClientMessage(playerid,COLOR_ADMIN,string); SetPlayerSkin(playerid,217); TeleportPlayer(playerid,1265.4495,-2047.3251,59.2685); } if (AccountInfo[playerid][aCarcel] == 1) { SetPlayerInterior(playerid,6); TeleportPlayer(playerid,264.6288,77.5742,1001.0391); SendClientMessage(playerid,COLOR_ADMIN,"AdminMsg: Condena incompleta, Sigue tu condena"); } } } else { if(strlen(inputtext)) { new girismsg[256]; printf("%s Erro en su contraseсa.",playername2); format(girismsg,256,"Contraseсa Incorrecta\n\nPor favor escribe tu contraseсa:"); ShowPlayerDialog(playerid,28,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Salir"); login[playerid] = 1; register[playerid] = 0; fclose(UserFile); return 1; } } if(!strlen(inputtext)) { new girismsg[256]; printf("%s No puso su contraseсa.",playername2); format(girismsg,256,"No escribiste tu contraseсa\n\nPor favor escribe tu contraseсa:"); ShowPlayerDialog(playerid,28,DIALOG_STYLE_INPUT,"Login",girismsg,"Login","Salir"); login[playerid] = 1; register[playerid] = 0; fclose(UserFile); return 1; } } } //climas case 29 : { if(listitem == 0) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 0); } } if(listitem == 1) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 8); } } if(listitem == 2) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 9); } } if(listitem == 3) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 11); } } if(listitem == 4) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 16); } } if(listitem == 5) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 19); } } if(listitem == 6) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 20); } } if(listitem == 7) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 21); } } if(listitem == 8) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 22); } } if(listitem == 9) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 500); } } if(listitem == 10) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 62); } } if(listitem == 11) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 86); } } if(listitem == 12) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 91); } } if(listitem == 13) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 72); } } if(listitem == 14) { for(new player=0; player<MAX_PLAYERS; player++) { SetPlayerWeather(playerid, 75); } } } } } else {//si no responde al logueo switch ( dialogid ) { case 26 : { SendClientMessage(playerid, COLOR_GREEN, "* Has decidido no registrarte"); SendClientMessage(playerid, COLOR_GREEN, "* No se guardaran tu progresos"); return 1; } case 27 : { SendClientMessage(playerid, COLOR_GREEN, "* Has decidido no logear"); SendClientMessage(playerid, COLOR_GREEN, "* No se guardaran tu progresos"); return 1; } case 28 : { SendClientMessage(playerid, COLOR_GREEN, "* Has decidido no logear"); SendClientMessage(playerid, COLOR_GREEN, "* No se guardaran tu progresos"); return 1; } } } return 0; } public AdminChat(color,const string[],level) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if (AccountInfo[i][aAdmin] >= level) { SendClientMessage(i, color, string); } } } return 1; } public Segundo() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(AccountInfo[i][aCarcel] == 1) { if(AccountInfo[i][aTiempoCarcel] > 0) { AccountInfo[i][aTiempoCarcel]--; } if(AccountInfo[i][aTiempoCarcel] <= 0) { AccountInfo[i][aCarcel] = 0; AccountInfo[i][aTiempoCarcel] = 0; AccountInfo[i][aBloqueado] = 0; SetPlayerInterior(i, 6); SetPlayerPos(i,246.8439,70.0776,1003.6406); SendClientMessage(i,COLOR_ADMIN,"AdminMsg: Has Sido liverado."); SendClientMessage(i,COLOR_ADMIN,"AdminMsg: Piensalo dos veses antes de romper las reglas."); GameTextForPlayer(i, "~g~Libre~n~~w~Se un buen ciudadano", 5000, 1); } } } } } public cprivado(carid) { if((carid >= 1 && carid <= 26)/* || (carid >= 112 && carid <= 130) || (carid >= 262 && carid <= 267)*/)//ahi esta por si quieren poner mas carros para dmins { return 1; } return 0; } //los carros privados de admin MessageForDriver(playerid) { new vid = GetPlayerVehicleID(playerid); if(cprivado(vid)) { if(AccountInfo[playerid][aAdmin] > 0) { SendClientMessage(playerid,COLOR_WHITE,"* Alarma antirrobo encendida."); SendClientMessage(playerid,COLOR_WHITE,"* Conduce con cuidado."); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,COLOR_WHITE,"* Este vehiculo es propiedad de los admin."); SendClientMessage(playerid,COLOR_WHITE,"* Usted No tiene las llaves de este vehiculo."); } } return 1; } //crear carro CreatePlayerVehicle( playerid, modelid ) { new vehicle, Float:x, Float:y, Float:z, Float:angle; new color1=random(126); new color2=random(126); new string[256]; GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,angle); vehicle = CreateVehicle( modelid, (x + 2), (y + 2), (z + 0.5), angle, color1, color2, 300); LinkVehicleToInterior( vehicle, GetPlayerInterior( playerid ) ); SetVehicleVirtualWorld( vehicle, GetPlayerVirtualWorld( playerid ) ); format(string,sizeof(string),"Has spawneado un %s [Modelo %d] color [%d,%d]",Veiculos[GetVehicleModel(vehicle)-400],modelid,color1,color2); SendClientMessage(playerid,COLOR_WHITE,string); return 1; } //stock stock ini_GetKey( line[] ) { new keyRes[256]; keyRes[0] = 0; if ( strfind( line , "=" , true ) == -1 ) return keyRes; strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) ); return keyRes; } stock ini_GetValue( line[] ) { new valRes[256]; valRes[0]=0; if ( strfind( line , "=" , true ) == -1 ) return valRes; strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) ); return valRes; } stock TeleportPlayer(playerid, Float:x,Float:y,Float:z) { new cartype = GetPlayerVehicleID(playerid); new State=GetPlayerState(playerid); if(State!=PLAYER_STATE_DRIVER) { SetPlayerPos(playerid,x,y,z); } else if(IsPlayerInVehicle(playerid, cartype) == 1) { SetVehiclePos(cartype,x,y,z); } else { SetPlayerPos(playerid,x,y,z); } } stock strrest(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[128]; while ((index < length) && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; }