Jermuk
Informant
|
|
Registrierung: |
25.09.2008, 20:26 |
User-Info: |
Blutiger Anfänger |
Lieblings-GTA: |
GTA: Vice City |
Script Editor: |
Pawno |
Wohnort: |
Mist, vergessen |
Beiträge: |
48
|
|
Vielen vielen dank Florax und Dödel!
Ich hatte inzwischen mein Scrpt erweitert, so dass es nun zwei Inseln gibt. Was habe ich diesmal falsch gemacht? Ununterbrochen wird jetzt "Willkommen im V.I.P. Bereich" angezeigt. Aber nochmal vielen vielen Dank für eben.
Hier der Code:
Code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
| #include <a_samp> #define RED 0xE60000FF #define GREEN 0x21DD00FF
new gAreaTime = 100; forward AdminArea(playerid); new tmp = 100; new tmp2 = 100; new string[256]; new i, Float:X, Float:Y, Float:Z; new wahr; new wahr2; new Jermuk=0; new Merlin=0;
stock PlayerName(i) { new name[MAX_PLAYER_NAME]; GetPlayerName(i,name,MAX_PLAYER_NAME); return name; }
public OnGameModeInit() { SetTimer("AdminArea",gAreaTime,1); return 1; }
public IsPlayerInVipZone(i) { GetPlayerPos(i, X, Y, Z); if (X <= 206.71 && X >= 19.33 && Y <= 450 && Y >= 240.93) { wahr=1; return 1; } else { wahr=0; return 0; } }
public IsPlayerInMerlinsZone(i) { GetPlayerPos(i, X, Y, Z); if (X <= 1186 && X >= 984 && Y <= -2634 && Y >= -2918) { wahr2=1; return 1; } else { wahr2=0; return 0; } }
public AdminArea(playerid)
{ for (i = 0; i < MAX_PLAYERS; i++) {
IsPlayerInVipZone(i); if(strcmp(PlayerName(i),"Jermuk", true) == 0 && wahr==0 && tmp==i) { SendClientMessage(i,GREEN, "Bis Bald!"); format(string, sizeof(string), "Bis Bald!"); GameTextForPlayer(i,string,3000,3); tmp=100; } if (IsPlayerInVipZone(i)) { if(strcmp(PlayerName(i),"Jermuk",true) == 0) { if (tmp!=i) { SendClientMessage(i,GREEN, "Willkommen im V.I.P. Bereich!"); format(string, sizeof(string), "Willkommen im V.I.P. Bereich!"); GameTextForPlayer(i,string,3000,3); tmp=i; }
}
else { SendClientMessage(i,RED,string); SendClientMessage(i,RED,"Du bist im V.I.P. Gebiet!!! Betreten Verboten!"); format(string, sizeof(string), "Du bist im V.I.P. Gebiet!!! Betreten Verboten!"); GameTextForPlayer(i,string,5000,3); SetPlayerHealth(i,0); } } IsPlayerInMerlinsZone(i); if(strcmp(PlayerName(i),"Merlin", true) == 0 && wahr2==0 && tmp2==i) { SendClientMessage(i,GREEN, "Bis Bald!"); format(string, sizeof(string), "Bis Bald!"); GameTextForPlayer(i,string,3000,3); tmp2=100; } if (IsPlayerInMerlinsZone(i)) { if(strcmp(PlayerName(i),"Merlin", true) == 0) { if (tmp2!=i) { SendClientMessage(i,GREEN, "Willkommen auf Merlins Insel!"); format(string, sizeof(string), "Willkommen auf Merlins Insel!"); GameTextForPlayer(i,string,3000,3); tmp2=i; }
}
else { SendClientMessage(i,RED,"Du bist auf Merlins Insel!!! Betreten Verboten!"); format(string, sizeof(string), "Du bist auf Merlins Insel!!! Betreten Verboten!"); GameTextForPlayer(i,string,5000,3); SetPlayerHealth(i,0); } } } }
|
Danke im voraus,
Gruß Jermuk
|
|