17.07.2012, 14:51
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/admins", true) == 0) { new Jogador[24]; new count5; new msg[120]; for(new i=0; i<MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && IsPlayerAdmin(i)){ GetPlayerName(i,Jogador,24); format(msg,sizeof(msg),"Admins Online: %s", Jogador); SendClientMessage(playerid, 0xFFFFFFAA, msg); count5++; } } if(count5 == 0){ SendClientMessage(playerid, 0xFFFFFFAA, "Nenhum Admin Online No Momento Aguarde."); } return 1; } // ==================================sistema afk================================================================================== if(strcmp("/afk", cmdtext, true, 10) == 0) { new pname[MAX_PLAYER_NAME]; new string [256]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "{00FF7F}[AFK]: {FFFFFF}%s Entrou no Modo AFK! {00FF7F}(/afk)", pname); SendClientMessageToAll(0x00F400AA, string); SetPlayerHealth(playerid, 999999); TogglePlayerControllable(playerid, 0); return 1; } //=================================sair afk======================================================================================== if(strcmp("/sairafk", cmdtext, true, 10) == 0) { new pname[MAX_PLAYER_NAME]; new string [256]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "{00FF7F}[AFK]: {FFFFFF}%s Saiu do modo! {00FF7F}(/afk)", pname); SendClientMessageToAll(0x00F400AA, string); TogglePlayerControllable(playerid, 1); SetPlayerHealth(playerid, 100.0); return 1; } //================================sistema kit====================================================================================== if(strcmp("/kit", cmdtext, true, 10) == 0) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 99999); GivePlayerWeapon(playerid, 30, 99999); GivePlayerWeapon(playerid, 26, 99999); GivePlayerWeapon(playerid, 8, 99999); GivePlayerWeapon(playerid, 18, 99999); GivePlayerWeapon(playerid, 32, 99999); GivePlayerWeapon(playerid, 1, 99999); GivePlayerWeapon(playerid, 33, 99999); GivePlayerWeapon(playerid, 46, 99999); GivePlayerWeapon(playerid, 44, 99999); SendClientMessage(playerid, -4, "Voce usou /kit"); return 1; } //=================================sistema kit2==================================================================================== if(strcmp("/kit2", cmdtext, true, 10) == 0) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 22, 99999); GivePlayerWeapon(playerid, 1, 99999); GivePlayerWeapon(playerid, 9, 99999); GivePlayerWeapon(playerid, 25, 99999); GivePlayerWeapon(playerid, 31, 99999); GivePlayerWeapon(playerid, 28, 99999); GivePlayerWeapon(playerid, 34, 99999); GivePlayerWeapon(playerid, 39, 99999); GivePlayerWeapon(playerid, 40, 99999); GivePlayerWeapon(playerid, 46, 99999); GivePlayerWeapon(playerid, 44, 99999); SendClientMessage(playerid, -3, "Voce usou /kit2"); return 1; } //================================kit 3========================================================================================== if(strcmp("/kit3", cmdtext, true, 10) == 0) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 23, 99999); GivePlayerWeapon(playerid, 5, 99999); GivePlayerWeapon(playerid, 1, 99999); GivePlayerWeapon(playerid, 27, 99999); GivePlayerWeapon(playerid, 17, 99999); GivePlayerWeapon(playerid, 33, 99999); GivePlayerWeapon(playerid, 29, 99999); GivePlayerWeapon(playerid, 46, 99999); GivePlayerWeapon(playerid, 44, 99999); SendClientMessage(playerid, -2, " Voce usou /kit3"); return 1; } //================================sistema de grana================================================================================== if(strcmp("/grana", cmdtext, true, 10) == 0) { GivePlayerMoney(playerid, 700000); SendClientMessage(playerid, -1, "Voce recebeu grana por usar /grana"); return 1; } //================================colete========================================================================================== if(strcmp("/colete", cmdtext, true, 10) == 0) { SetPlayerArmour(playerid, 100); SendClientMessage(playerid, -1, "Voce recebeu 100 de colete por usar /colete"); return 1; } //================================vida============================================================================================ if(strcmp("/vida", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid, 100); SendClientMessage(playerid, -1, "Voce recebeu 100 de vida por usar /vida"); return 1; } // =============================== TELEPORTES PRINCIPAL ! Й NOIS ! By: Jonathan_Feitosa =========================================== if(!strcmp("/teleportes", cmdtext, true)) { ShowPlayerDialog(playerid, JFS_OWNA, DIALOG_STYLE_LIST, "{33CCFF} ---- Teleportes By: Matheus_BLS ---- ", "{FFFF00}Drift\n{33AA33}DM\n{33CCFF}Corrida", "Selecionar", "Cancelar"); return 1; } //=======================================DRIFT1===================================================================================== if(strcmp(cmdtext,"/drift1",true)==0) { new vehicleid = GetPlayerVehicleID(playerid); new State = GetPlayerState(playerid); if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER) { GameTextForPlayer(playerid,"",4000,6); LinkVehicleToInterior(vehicleid,0); SetPlayerInterior(playerid,0); return SetVehiclePos(vehicleid,-309.5192,1524.6515,75.3710); } SetPlayerPos(playerid,-309.5192,1524.6515,75.3710); SetPlayerInterior(playerid,0); return 1; } //=============================DRIFT 2=============================================================================================== if(strcmp(cmdtext,"/drift2",true)==0) { new vehicleid = GetPlayerVehicleID(playerid); new State = GetPlayerState(playerid); if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER) { GameTextForPlayer(playerid,"",4000,6); LinkVehicleToInterior(vehicleid,0); SetPlayerInterior(playerid,0); return SetVehiclePos(vehicleid,2330.5088,1428.1130,42.8203); } SetPlayerPos(playerid,2330.5088,1428.1130,42.8203); SetPlayerInterior(playerid,0); return 1; } //===========================kill===================================================================================================== if (strcmp(cmdtext, "/kill", true)==0) { SendClientMessage(playerid,0x0000FFAA,"Vocк se matou!"); // MENSAGEM SetPlayerHealth(playerid, 0); // DANDO SANGUE 0 ! return 1; } // =========================== Crйditos ============================== if (strcmp("/creditos", cmdtext, true, 10) == 0) { new creditos[300]; strins(creditos,"{7491F6}Contato-MSN:Matheus1998_ct@hotmail.com\n",strlen(creditos)); strins(creditos,"{7491F6}Criado Por : Matheus_BLS \n",strlen(creditos)); //MENSAGEM strins(creditos,"Obrigado Pedro_BLS por me fazer ser gay e comeзar aprender pawno\n",strlen(creditos)); ShowPlayerDialog(playerid,8439, DIALOG_STYLE_MSGBOX, "{F60000} ----------- Crйditos ----------- ",creditos, "Fechar", ""); // 1 BOTAO APENAR return 1; } //=========================Ajuda================================================ if(strcmp(cmdtext,"/ajuda",true)==0) { new ajuda[1000]; // strins(ajuda,"\n",strlen(ajuda)); strins(ajuda,"{7491F6}/admins /creditos /teleportes /kill /grana /admins\n",strlen(ajuda)); strins(ajuda,"{7491F6}Para Administradores : /grana /admins\n",strlen(ajuda)); ShowPlayerDialog(playerid,8439, DIALOG_STYLE_MSGBOX, "{F60000} ----------------- Ajuda --------------- ",ajuda, "Fechar", ""); return 1; } return SendClientMessage(playerid, 0xAA3333AA, "BLS-[DRIFT/DM]Comando Desconhecido Pelo Servidor"); } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { SendClientMessage(playerid, -1, "Voce entrou em um veiculo dirija com cuidado"); GameTextForPlayer(playerid, "~y~Voce ~g~entrou em um veiculo", 2000,3); return 1; }