Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*==============================================================================
- Include Criada por MrToddy_ Usado no Just Scavenge
- Used in Just Scavenge server.
- Scavenge and Survive by Southclaw
- CONCEITOS DA INCLUDE
- > MAP KEY < (Tecla para abrir o mapa, sem precisar entrar no ESC)
- {{{{{{{{{{{}}}}}}}}}}}}} Include by MrToddy_
- ==============================================================================*/
- #include <a_samp> // by SA-MP team
- #include <YSI\y_hooks> // by Y_Less
- #include <DOF2> // Não achei quem criou, então caso alguém saiba, por favor, deixe aí que eu irei mudar =(
- /*
- Callbacks
- */
- forward OpenMap(playerid); // Não usadas
- forward ExitMap(playerid); // Não usadas
- /*
- News
- */
- new Text:MAPA;
- public OnFilterScriptInit()
- {
- printf("/*=========================\n\n");
- printf("\nInclude KeyMap by: MrToddy_\n\n");
- printf("=============================*/");
- return 1;
- }
- hook OnPlayerConnect(playerid)
- {
- MAPA = TextDrawCreate(120.0, 20.0, "samaps:map");
- TextDrawFont(MAPA, 4);
- TextDrawColor(MAPA, 0xFFFFFFFF);
- TextDrawTextSize(MAPA, 400.0, 400.0);
- return 1;
- }
- hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys & KEY_WALK)
- {
- if(IsPlayerConnected(playerid))
- {
- MostrarMapa(playerid);
- }
- }
- if(newkeys & KEY_CROUCH)
- {
- if(IsPlayerConnected(playerid))
- {
- TirarMapa(playerid);
- }
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- printf("/*========================\n\n");
- printf("\nInclude KeyMap desligando.\n\n");
- printf("============================*/");
- return 1;
- }
- /*
- Stocks
- */
- stock MostrarMapa(playerid)
- {
- TextDrawShowForPlayer(playerid, MAPA);
- SendClientMessage(playerid, -1, "[ > ] Você abriu o Mapa, você pode fecha-lo apertando C !");
- return 1;
- }
- stock TirarMapa(playerid)
- {
- TextDrawHideForPlayer(playerid, MAPA);
- SendClientMessage(playerid, -1, "[ > ] Você fechou o Mapa, você pode abri-lo apertando L-ALT !");
- return 1; }
- }
- //======================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement