Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
- #include <a_samp>
- #include <zcmd>
- #define pressed(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define TIMER:%0(%1) forward%0(%1); public%0(%1)
- enum mInfo{
- bool:EstasMuriendo,
- bool:EstasCaminando,
- Float:DataMoribundo[3],
- ObjetoMoribundo[2],
- MatarMoribundo[2],
- ContarMoribundo,
- PlayerText:ContadorMoribundo, };
- new InfoMoribundo[MAX_PLAYERS][mInfo];
- public OnPlayerSpawn(playerid){
- PlayerTextDrawDestroy(playerid,InfoMoribundo[playerid][ContadorMoribundo]);
- if(InfoMoribundo[playerid][EstasMuriendo]==true){
- InfoMoribundo[playerid][ContadorMoribundo]=CreatePlayerTextDraw(playerid,554.000000, 396.000000, "_");
- PlayerTextDrawAlignment(playerid,InfoMoribundo[playerid][ContadorMoribundo],2);
- PlayerTextDrawBackgroundColor(playerid,InfoMoribundo[playerid][ContadorMoribundo],255);
- PlayerTextDrawFont(playerid,InfoMoribundo[playerid][ContadorMoribundo],2);
- PlayerTextDrawLetterSize(playerid,InfoMoribundo[playerid][ContadorMoribundo],0.220000,2.100000);
- PlayerTextDrawColor(playerid,InfoMoribundo[playerid][ContadorMoribundo],-1);
- PlayerTextDrawSetOutline(playerid,InfoMoribundo[playerid][ContadorMoribundo],1);
- PlayerTextDrawSetProportional(playerid,InfoMoribundo[playerid][ContadorMoribundo],1);
- PlayerTextDrawSetSelectable(playerid,InfoMoribundo[playerid][ContadorMoribundo],false);
- TogglePlayerControllable(playerid,false);
- SetPlayerHealth(playerid,10.0);
- for(new time=0;time<2;time++) {KillTimer(InfoMoribundo[playerid][MatarMoribundo][time]);}
- InfoMoribundo[playerid][ContarMoribundo]=40;
- PlayerTextDrawShow(playerid,InfoMoribundo[playerid][ContadorMoribundo]);
- InfoMoribundo[playerid][MatarMoribundo][1]=SetTimerEx("MoribundoDecidiendo",1*1000,true,"d",playerid);
- SetPlayerPos(playerid,InfoMoribundo[playerid][DataMoribundo][0],InfoMoribundo[playerid][DataMoribundo][1],InfoMoribundo[playerid][DataMoribundo][2]);
- for(new obj=0;obj<2;obj++) {DestroyPlayerObject(playerid,InfoMoribundo[playerid][ObjetoMoribundo][obj]);}
- InfoMoribundo[playerid][ObjetoMoribundo][0]=CreatePlayerObject(playerid,18656,InfoMoribundo[playerid][DataMoribundo][0],InfoMoribundo[playerid][DataMoribundo][1],InfoMoribundo[playerid][DataMoribundo][2]+40.0+5,-90,0,0);
- InfoMoribundo[playerid][ObjetoMoribundo][1]=CreatePlayerObject(playerid,19295,InfoMoribundo[playerid][DataMoribundo][0],InfoMoribundo[playerid][DataMoribundo][1],InfoMoribundo[playerid][DataMoribundo][2]+40.0,0,0,0);
- SetPlayerCameraPos(playerid,InfoMoribundo[playerid][DataMoribundo][0],InfoMoribundo[playerid][DataMoribundo][1],InfoMoribundo[playerid][DataMoribundo][2]+5);
- SetPlayerCameraLookAt(playerid,InfoMoribundo[playerid][DataMoribundo][0],InfoMoribundo[playerid][DataMoribundo][1],180);
- for(new msg=0;msg<32;msg++) {SendClientMessage(playerid,-1," ");}
- SendClientMessage(playerid,-1,"INFO: Usted se encuentra entre la vida y la muerte, ve hacia la luz o muere!.");
- } return true;
- }
- public OnPlayerDeath(playerid, killerid, reason){
- if(InfoMoribundo[playerid][EstasMuriendo]==false){
- InfoMoribundo[playerid][EstasMuriendo]=true;
- InfoMoribundo[playerid][EstasCaminando]=true;
- GetPlayerPos(playerid,InfoMoribundo[playerid][DataMoribundo][0],InfoMoribundo[playerid][DataMoribundo][1],InfoMoribundo[playerid][DataMoribundo][2]);
- SendClientMessage(playerid,-1,"INFO: Usted se encuentra entre la vida y la muerte, ve hacia la luz o muere!.");
- } return true;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
- if(pressed(KEY_SPRINT) && InfoMoribundo[playerid][EstasMuriendo]==true){
- new Float:position[3]; GetPlayerObjectPos(playerid,InfoMoribundo[playerid][ObjetoMoribundo][1],position[0],position[1],position[2]);
- MovePlayerObject(playerid,InfoMoribundo[playerid][ObjetoMoribundo][1],position[0],position[1],position[2]-1,20);
- if(position[2]<=12.316715 && InfoMoribundo[playerid][EstasCaminando]==true){
- InfoMoribundo[playerid][EstasCaminando]=false;
- KillTimer(InfoMoribundo[playerid][MatarMoribundo][1]);
- InfoMoribundo[playerid][MatarMoribundo][1]=SetTimerEx("MoribundoViviendo",3*1000,true,"d",playerid);
- for(new msg=0;msg<32;msg++) {SendClientMessage(playerid,-1," ");}
- SendClientMessage(playerid,-1,"INFO: Usted ha llegado al final de la luz!.");
- }
- } return true;
- }
- TIMER: MoribundoViviendo(playerid){
- InfoMoribundo[playerid][ContarMoribundo]=0;
- InfoMoribundo[playerid][EstasMuriendo]=false;
- InfoMoribundo[playerid][EstasCaminando]=false;
- TogglePlayerControllable(playerid,true);
- SetCameraBehindPlayer(playerid);
- PlayerTextDrawHide(playerid,InfoMoribundo[playerid][ContadorMoribundo]);
- for(new msg=0;msg<32;msg++) {SendClientMessage(playerid,-1," ");}
- SendClientMessage(playerid,-1,"INFO: Usted ha decidido vivir, felicidades!.");
- for(new obj=0;obj<2;obj++) {DestroyPlayerObject(playerid,InfoMoribundo[playerid][ObjetoMoribundo][obj]);}
- for(new index=0;index<3;index++) {InfoMoribundo[playerid][DataMoribundo][index]=0;}
- for(new time=0;time<2;time++) {KillTimer(InfoMoribundo[playerid][MatarMoribundo][time]);}
- SetPlayerPos(playerid,-2661.7263,634.0160,14.4531); //hospital san fierro
- SetPlayerHealth(playerid,100.0);
- }
- TIMER: MoribundoDecidiendo(playerid){
- new data[40];
- InfoMoribundo[playerid][ContarMoribundo]--;
- format(data, sizeof(data), "~r~segundos restantes:~n~~w~00:00:%02d", InfoMoribundo[playerid][ContarMoribundo]);
- PlayerTextDrawSetString(playerid,InfoMoribundo[playerid][ContadorMoribundo],data);
- if(InfoMoribundo[playerid][ContarMoribundo]<=0){
- InfoMoribundo[playerid][ContarMoribundo]=0;
- InfoMoribundo[playerid][EstasMuriendo]=false;
- InfoMoribundo[playerid][EstasCaminando]=false;
- TogglePlayerControllable(playerid,true);
- SetCameraBehindPlayer(playerid);
- PlayerTextDrawHide(playerid,InfoMoribundo[playerid][ContadorMoribundo]);
- for(new msg=0;msg<32;msg++) {SendClientMessage(playerid,-1," ");}
- SendClientMessage(playerid,-1,"INFO: Usted ha decidido morir!.");
- for(new obj=0;obj<2;obj++) {DestroyPlayerObject(playerid,InfoMoribundo[playerid][ObjetoMoribundo][obj]);}
- for(new index=0;index<3;index++) {InfoMoribundo[playerid][DataMoribundo][index]=0;}
- for(new time=0;time<2;time++) {KillTimer(InfoMoribundo[playerid][MatarMoribundo][time]);}
- SetPlayerPos(playerid,825.5798,-1102.6852,25.7891); //cementerio los santos
- SetPlayerHealth(playerid,100.0);
- }
- }
- //testing
- COMMAND:morir(playerid, params[]){
- SetPlayerHealth(playerid,0.0);
- return true;
- }
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement