Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Include by DiSwaG aka. eVasi0n
- #define Schleife(%1,%2) \
- for(new %1 = 0; %1 != %2; %1 ++)
- #define VarSchleife(%1,%2) \
- for(%1 = 0; %1 != %2; %1 ++)
- #define SizeSchleife(%1,%2) \
- for(new %1 = 0; %1 != sizeof(%2); %1 ++)
- #define VarSizeSchleife(%1,%2) \
- for(%1 = 0; %1 != sizeof(%2); %1 ++)
- #define InputMin(%1,%2) \
- strlen(%1) < %2
- #define InputMax(%1,%2) \
- strlen(%1) >= %2
- #define DeaktiviereEnterExit(); DisableInteriorEnterExits();
- #define CJLaufstyle(); UsePlayerPedAnims();
- #define SpielerMarker(%1); \
- ShowPlayerMarkers(%1);
- #define StuntBonus(%1); \
- EnableStuntBonusForAll(%1);
- new Text:DiSwaGFade[MAX_PLAYERS],
- DiSwaGTimer[MAX_PLAYERS],
- FadeStatus[MAX_PLAYERS]
- ;
- stock SetPlayerPosEx(playerid,Float:DiX,Float:DiY,Float:DiZ,Float:DiF,DiInt,DiWorld)
- {
- SetPlayerPos(playerid,DiX,DiY,DiZ);
- SetPlayerFacingAngle(playerid,DiF);
- SetPlayerInterior(playerid,DiInt);
- SetPlayerVirtualWorld(playerid,DiWorld);
- SetCameraBehindPlayer(playerid);
- }
- stock KickEx(playerid,const Farbe,const Grund[])
- {
- new kickstr[128];
- format(kickstr,sizeof(kickstr),"%s wurde gekickt. Grund: %s",GetNameEx(playerid),Grund);
- SendClientMessageToAll(Farbe,kickstr);
- return SetTimerEx("KickSpieler",100,false,"i",playerid);
- }
- stock GetNameEx(playerid)
- {
- new DSGName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,DSGName,sizeof(DSGName));
- return DSGName;
- }
- stock Freeze(playerid)
- {
- return TogglePlayerControllable(playerid, false);
- }
- stock Unfreeze(playerid)
- {
- return TogglePlayerControllable(playerid, true);
- }
- stock DiOnGameModeInit()
- {
- Schleife(i, MAX_PLAYERS)
- {
- DiSwaGFade[i] = TextDrawCreate( -20.000000, 0.000000, "_");
- TextDrawUseBox(DiSwaGFade[i], 1);
- TextDrawBoxColor(DiSwaGFade[i], 0);
- TextDrawAlignment(DiSwaGFade[i], 0);
- TextDrawBackgroundColor(DiSwaGFade[i], 0);
- TextDrawFont(DiSwaGFade[i], 3);
- TextDrawLetterSize(DiSwaGFade[i], 1.000000, 52.200000);
- TextDrawColor(DiSwaGFade[i], 0);
- }
- return 1;
- }
- stock DiOnGameModeExit()
- {
- Schleife(i, MAX_PLAYERS)
- {
- TextDrawHideForPlayer(i,DiSwaGFade[i]);
- TextDrawDestroy(DiSwaGFade[i]);
- KillTimer(DiSwaGTimer[i]);
- }
- return 1;
- }
- stock DiFade(playerid,FadeZeit)
- {
- new TimerZeit = FadeZeit * 50;
- DiSwaGTimer[playerid] = SetTimerEx("DiFadeTD",TimerZeit,true,"i",playerid);
- return 1;
- }
- forward DiFadeTD(playerid);
- public DiFadeTD(playerid)
- {
- switch(FadeStatus[playerid])
- {
- case 1:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 25);
- }
- case 2:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 50);
- }
- case 3:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 75);
- }
- case 4:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 100);
- }
- case 5:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 125);
- }
- case 6:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 150);
- }
- case 7:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 175);
- }
- case 8:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 200);
- }
- case 9:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 225);
- }
- case 10:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 250);
- }
- case 11:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 225);
- }
- case 12:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 200);
- }
- case 13:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 175);
- }
- case 14:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 159);
- }
- case 15:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 125);
- }
- case 16:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 100);
- }
- case 17:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 75);
- }
- case 18:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 50);
- }
- case 19:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 25);
- }
- case 20:
- {
- TextDrawBoxColor(DiSwaGFade[playerid], 0);
- KillTimer(DiSwaGTimer[playerid]);
- TextDrawHideForPlayer(playerid,DiSwaGFade[playerid]);
- FadeStatus[playerid] = 0;
- return true;
- }
- }
- TextDrawHideForPlayer(playerid,DiSwaGFade[playerid]);
- TextDrawShowForPlayer(playerid,DiSwaGFade[playerid]);
- return FadeStatus[playerid] ++;
- }
- forward KickSpieler(playerid);
- public KickSpieler(playerid)
- {
- return Kick(playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement