Forum Gtatwo Strona Główna  
 FAQ  •  Szukaj  •  Użytkownicy  •  Grupy •  Galerie   •  Rejestracja  •  Profil  •  Zaloguj się, by sprawdzić wiadomości  •  Zaloguj
 Problem with "dealy here" ;/ Zobacz następny temat
Zobacz poprzedni temat
Napisz nowy tematOdpowiedz do tematu
Autor Wiadomość
Razor
DonCorleone
<i>DonCorleone</i>


Dołączył: 22 Maj 2008
Posty: 3026 Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Śro 0:27, 13 Sie 2008 Powrót do góry

I've got a problem with DEALY_HERE. In the script is writing separete DELAY for each player. In spite of this if a 1 player enter to any field (IF_CHAR_IN_ZONE) it means that DELAY is putting up for EACH PLAYERS . not only for this , who enter in this field!

Or in another way (if u don't know what I mean)

DH is counting for every player it means if one person enter for area X Y Z everybody get "expectation time" but not only this person who enter;d


SCRIPT:

Kod:

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\
//     Mafia Style created by Razor || razorgta2.lua.pl   \\
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\



// player's
PLAYER_PED player1 = (121.5, 137.5, 6.0) 7 0
PLAYER_PED player2 = (143.5, 118.5, 6.0) 10 0
PLAYER_PED player3 = (160.5, 142.5, 6.0) 13 0
PLAYER_PED player4 = (135.5, 157.5, 6.0) 11 0


SAVED_COUNTER true = 1
SAVED_COUNTER false = 0

//powerups and guns
GENERATOR fr = (140.5, 137.5, 3.0 ) 0 COLLECT_36 3000 3000 1
GENERATOR mgun1 = (135.5, 157.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR mgun2 = (124.5, 137.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR mgun3 = (140.5, 121.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR mgun4 = (16.5, 140.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR sg1 = (136.5, 133.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR sg2 = (144.5, 133.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR sg3 = (144.5, 141.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR sg4 = (136.5, 141.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR koka1 = (157.5, 157.5, 4.0 ) 0 COLLECT_04 2300 2300 10
GENERATOR koka2 = (159.5, 151.5, 4.0 ) 0 COLLECT_04 2300 2300 10
GENERATOR koka3 = (121.5, 116.5, 4.0 ) 0 COLLECT_04 2300 2300 10
GENERATOR koka4 = (119.5, 156.5, 4.0 ) 0 COLLECT_04 2300 2300 10
GENERATOR armor4 = (138.5, 139.5, 4.0 ) 0 COLLECT_31 2300 2300 1
GENERATOR armor3 = (142.5, 139.5, 4.0 ) 0 COLLECT_31 2300 2300 1
GENERATOR armor2 = (142.5, 135.5, 4.0 ) 0 COLLECT_31 2300 2300 1
GENERATOR armor1 = (138.5, 135.5, 4.0 ) 0 COLLECT_31 2300 2300 1

//phones
OBJ_DATA phone1 = ( 139.5 , 116.5 , 4.0 ) 090 PHONE
OBJ_DATA phone2 = ( 140.5 , 158.5 , 4.0 ) 270 PHONE
OBJ_DATA phone3 = ( 119.5 , 137.5 , 4.0 ) 180 PHONE
OBJ_DATA phone4 = ( 161.5 , 136.5 , 4.0 ) 000 PHONE
//bodyguards p1
CHAR_DATA zbgp1
CHAR_DATA xbgp2
CHAR_DATA ybgp3
CHAR_DATA ubgp4
//counters
COUNTER loop = 1

LEVELSTART
//information
DISPLAY_BRIEF (3029)


//sets (light levels)
SET_SHADING_LEVEL (20)
SET_AMBIENT_LEVEL ( 0.3 , 3 )

//generators!
SWITCH_GENERATOR ( fr , ON )
SWITCH_GENERATOR ( mgun1 , ON )
SWITCH_GENERATOR ( mgun2 , ON )
SWITCH_GENERATOR ( mgun3 , ON )
SWITCH_GENERATOR ( mgun4 , ON )
SWITCH_GENERATOR ( sg1 , ON )
SWITCH_GENERATOR ( sg2 , ON )
SWITCH_GENERATOR ( sg3 , ON )
SWITCH_GENERATOR ( sg4 , ON )
SWITCH_GENERATOR ( koka1 , ON )
SWITCH_GENERATOR ( koka2 , ON )
SWITCH_GENERATOR ( koka3 , ON )
SWITCH_GENERATOR ( koka4 , ON )
SWITCH_GENERATOR ( armor1 , ON )
SWITCH_GENERATOR ( armor2 , ON )
SWITCH_GENERATOR ( armor3 , ON )
SWITCH_GENERATOR ( armor4 , ON )


//bg

WHILE ( loop = 1 )
//P1
// p1 bg phone1
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
 
zbgp1 = CREATE_CHAR ( 121.0, 142.0 , 4.0 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
DELAY_HERE (1500)
ENDIF
// p1 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
 
zbgp1 = CREATE_CHAR ( 143.0, 158.0 , 4.0 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
DELAY_HERE (1500)
ENDIF

// p1 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))
 
zbgp1 = CREATE_CHAR ( 145.0, 117.0 , 4.0 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
DELAY_HERE (1500)
ENDIF
// p1 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
 
zbgp1 = CREATE_CHAR ( 160.0, 132.0 , 4.0 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
DELAY_HERE (1500)
ENDIF

//P2
// p2 bg phone1

IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
 
xbgp2 = CREATE_CHAR ( 121.0, 142.0 , 4.0 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
DELAY_HERE (1500)
ENDIF
// p2 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
 
xbgp2 = CREATE_CHAR ( 143.0, 158.0 , 4.0 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
DELAY_HERE (1500)
ENDIF

// p2 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))
 
xbgp2 = CREATE_CHAR ( 145.0, 117.0 , 4.0 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
DELAY_HERE (1500)
ENDIF
// p2 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
 
xbgp2 = CREATE_CHAR ( 160.0, 132.0 , 4.0 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
DELAY_HERE (1500)
ENDIF

//P3
// p3 bg phone1

IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
 
ybgp3 = CREATE_CHAR ( 121.0, 142.0 , 4.0 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
DELAY_HERE (1500)
ENDIF
// p3 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
 
ybgp3 = CREATE_CHAR ( 143.0, 158.0 , 4.0 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
DELAY_HERE (1500)
ENDIF

// p3 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))

ybgp3 = CREATE_CHAR ( 145.0, 117.0 , 4.0 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
DELAY_HERE (1500)
ENDIF
// p3 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
 
ybgp3 = CREATE_CHAR ( 160.0, 132.0 , 4.0 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
DELAY_HERE (1500)
ENDIF

//P4
// p4 bg phone1

IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
 
ubgp4 = CREATE_CHAR ( 121.0, 142.0 , 4.0 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
DELAY_HERE (1500)
ENDIF
// p4 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
 
ubgp4 = CREATE_CHAR ( 143.0, 158.0 , 4.0 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
DELAY_HERE (1500)
ENDIF

// p4 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))

ubgp4 = CREATE_CHAR ( 145.0, 117.0 , 4.0 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
DELAY_HERE (1500)
ENDIF
// p4 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
 
ubgp4 = CREATE_CHAR ( 160.0, 132.0 , 4.0 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
DELAY_HERE (1500)
ENDIF
ENDWHILE
LEVELEND

//Thanks to:
//Salamander (DrSlony)
//Arx


I hope i wrote this correctly ;] (upper sentences not code ;])

P.S my English is weak Sad
Zobacz profil autora
Lantyz
NL
NL


Dołączył: 23 Cze 2008
Posty: 1 Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Rotterdam

PostWysłany: Śro 1:19, 13 Sie 2008 Powrót do góry

The only thing that a DELAY_HERE does is quite literary "delaying" the script for the given amount of cycles. You can't tell it to delay for only one player; the script will just stop when it encounters a DELAY_HERE and continue when the cycles have passed.

If you want to delay the creation of the gangmembers when the player enters the zone, you should put the DELAY before the CREATE_CHAR-command. The way you've done it now doesn't delay the creation of the gang; it delays the next opportunity to get a new gang.

Also, to stop the script from creating an infinity of gangs as long as the player is in the zone, you should create extra COUNTERs to keep track of which players already have gangs and which don't.


Ostatnio zmieniony przez Lantyz dnia Śro 1:21, 13 Sie 2008, w całości zmieniany 1 raz
Zobacz profil autora
Razor
DonCorleone
<i>DonCorleone</i>


Dołączył: 22 Maj 2008
Posty: 3026 Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Śro 10:16, 13 Sie 2008 Powrót do góry

I have different soltion ;] Anyway ill try to "create" counters! Thx for help and file with programmer guide!
Zobacz profil autora
CarThief
NL
NL


Dołączył: 02 Gru 2006
Posty: 155 Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Netherlands(AKA Holland) - NL

PostWysłany: Sob 15:28, 23 Sie 2008 Powrót do góry

Ah, you emailed me, i sent reply, but since you kind brought back my attention back to this place, might as well reply here too then.

It seems the email wasnt to clear, thinking you wanted counters to keep track of things, not to measure time, though thats possible too, but if planning to make something track time induvidually, its going to be hard, i once tried making a clock of where an tank becomes agressive for some time, then stops for a break again, and it somehow didnt accept the clock's time, it never reacted!

Im not too experienced with delaying things with time other then DELAY_HERE. I have a similar suggestion as lantyz though, make a maximum limit of how many gang members you can have tops/max.
And keep track of it by counters, such as the IF ( Countername = 4 ), it does something else then create gang members.

On another note, i never had good experience with adding groups to player or anyone, and continuosly adding new members if one happens to die, it somehow always lead to crashes. But perhaps you have better luck.

Feel free to reply either here or trough email. Though email is faster, as the signature suggests im of late not too busy here.
Oh, making it check for players in certain sectors is sometimes more accurate as well, but requires adding an sector in the map. I forgot what kind, sadly.

Edit: Wow, 150 posts, certainly been long indeed... Razz


Ostatnio zmieniony przez CarThief dnia Sob 15:29, 23 Sie 2008, w całości zmieniany 1 raz
Zobacz profil autora
Razor
DonCorleone
<i>DonCorleone</i>


Dołączył: 22 Maj 2008
Posty: 3026 Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Sob 16:31, 23 Sie 2008 Powrót do góry

Cytat:
IF (LOCATE_CHARACTER_ANY_MEANS ( player1 , 119.5 , 137.5 , 4.0 , 1.0 , 1.0 ))
IF ( P1Once1 = 0 )
zbgp1 = CREATE_CHAR ( 121.0, 142.0 , 4.0 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 8 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
++P1Once1
ENDIF
ENDIF


I created something like this but it give me gang only one time peer all game ;/ not once peer one death ?

You know with i must change? ;/ with command i must use?
Zobacz profil autora
CarThief
NL
NL


Dołączył: 02 Gru 2006
Posty: 155 Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Netherlands(AKA Holland) - NL

PostWysłany: Nie 4:00, 24 Sie 2008 Powrót do góry

The script seems good enough, but you didnt add another one, to check when/if the player dies, to reset it and delete the current gangmember/helper.

Perhaps try something like this:
Kod:
IF ( HAS_CHARACTER_DIED ( player1 ) )//Checks for player's death.
DELETE_ITEM ( zbgp1 )//Deletes an ped, car, or object. If it has an arrow, remove that first!
IF ( P1Once1 = 1 )
SET P1Once1 = 0
ENDIF
ENDIF


Adding this in the loop, or something similar, will check if the player died, remove the guy who helps the player, and resets the counter, making it usable each time the player died, and respawned.
If you have multiple, more then 1 guys, delete those too in the procces of resetting the counter. Ending up with too many peds might crash sometime.

Edit: You should apply the code to every player, and each of their peds, if there are more then 1. If you know what i mean.


Ostatnio zmieniony przez CarThief dnia Nie 6:58, 24 Sie 2008, w całości zmieniany 1 raz
Zobacz profil autora
Razor
DonCorleone
<i>DonCorleone</i>


Dołączył: 22 Maj 2008
Posty: 3026 Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Nie 11:26, 24 Sie 2008 Powrót do góry

Soemthing like this?


Cytat:
Player_ped gracz1 = (82.0, 7.0, 2.0) 8 225

Counter Loop = 1

CAR_DATA sterowany11

OBJ_DATA remote11 = (80.5, 5.5) 0 remote

LEVELSTART

sterowany11 = CREATE_CAR ( 250.0 , 250.5 ) 28 0 vtype END
Explode (sterowany11)

WHILE ( Loop = 1 )
IF (IS_CAR_WRECKED (sterowany11))
DELAY_HERE ( 10 )
IF (LOCATE_CHARACTER_ANY_MEANS ( gracz1 , 80.5 , 5.5 , 2.0 , 1.0 , 1.0 ))
ADD_SCORE ( gracz1 , -1 )
DELAY_HERE ( 10 )
ADD_SCORE ( gracz1 , 1 )
sterowany11 = CREATE_CAR ( 26.0 , 5.5 ) 28 0 vtype END
TAKE_REMOTE_CONTROL_OF_CAR ( gracz1 , sterowany11 )
ENDIF
ENDIF
ENDWHILE

LEVELEND
Zobacz profil autora
CarThief
NL
NL


Dołączył: 02 Gru 2006
Posty: 155 Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Netherlands(AKA Holland) - NL

PostWysłany: Nie 23:28, 24 Sie 2008 Powrót do góry

Im not completely sure what you try to create with that script, but it seems fine.

Lets see.... Hmm... that would forcefully give the player control over the wreck of the exploded car, when he's on the right area, most likely the one with the remote icon on it.
Hmm... or no... how strange, i dont think its too handy to duplicate an car, and then even try calling commands on it.

What are you trying anyway?

It also might be usefull to give a decent delay before the player gets control of the car, so he can move away. Else it repeats forever if he cant leave. Or maybe an limited amount of uses.
Zobacz profil autora
Razor
DonCorleone
<i>DonCorleone</i>


Dołączył: 22 Maj 2008
Posty: 3026 Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Czw 20:11, 28 Sie 2008 Powrót do góry

at least! Everything working now!

Kod:

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\
//     Mafia Style created by Razor || razorgta2.lua.pl   \\
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::\\



// player's
PLAYER_PED player1 = (121.5, 137.5, 6.0) 7 0
PLAYER_PED player2 = (143.5, 118.5, 6.0) 10 0
PLAYER_PED player3 = (160.5, 142.5, 6.0) 13 0
PLAYER_PED player4 = (135.5, 157.5, 6.0) 11 0


//powerups and guns
GENERATOR fr = (140.5, 137.5, 3.0 ) 0 COLLECT_36 3000 3000 1
GENERATOR mgunana = (138.5, 153.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR mgun2 = (124.5, 137.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR mgun3 = (140.5, 121.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR mguniacz = (158.5, 137.5, 4.0 ) 0 COLLECT_09 1600 1600 60
GENERATOR sg1 = (136.5, 133.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR sg2 = (144.5, 133.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR sg3 = (144.5, 141.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR sg4 = (136.5, 141.5, 4.0 ) 0 COLLECT_06 1900 1900 10
GENERATOR koka1 = (157.5, 157.5, 4.0 ) 0 COLLECT_04 2300 2300 15
GENERATOR koka2 = (159.5, 151.5, 4.0 ) 0 COLLECT_04 2300 2300 15
GENERATOR koka3 = (121.5, 116.5, 4.0 ) 0 COLLECT_04 2300 2300 15
GENERATOR koka4 = (119.5, 156.5, 4.0 ) 0 COLLECT_04 2300 2300 15
GENERATOR armor4 = (138.5, 139.5, 3.0 ) 0 COLLECT_31 2300 2300 1
GENERATOR armor3 = (142.5, 139.5, 3.0 ) 0 COLLECT_31 2300 2300 1
GENERATOR armor2 = (142.5, 135.5, 3.0 ) 0 COLLECT_31 2300 2300 1
GENERATOR armor1 = (138.5, 135.5, 3.0 ) 0 COLLECT_31 2300 2300 1




//phones
OBJ_DATA phone1 = ( 139.5 , 116.5 , 4.0 ) 090 PHONE
OBJ_DATA phone2 = ( 140.5 , 158.5 , 4.0 ) 270 PHONE
OBJ_DATA phone3 = ( 119.5 , 137.5 , 4.0 ) 180 PHONE
OBJ_DATA phone4 = ( 161.5 , 136.5 , 4.0 ) 000 PHONE
//bodyguards p1
CHAR_DATA zbgp1
CHAR_DATA xbgp2
CHAR_DATA ybgp3
CHAR_DATA ubgp4
//counters
SAVED_COUNTER true = 1
SAVED_COUNTER false = 0


COUNTER P1Once1 = 0
COUNTER P2Once1 = 0
COUNTER P3Once1 = 0
COUNTER P4Once1 = 0

LEVELSTART
//information
DISPLAY_BRIEF (2036)


//sets (light levels)
SET_SHADING_LEVEL (20)
SET_AMBIENT_LEVEL ( 0.3 , 3 )

//generators!
SWITCH_GENERATOR ( fr , ON )
SWITCH_GENERATOR ( mgunana , ON )
SWITCH_GENERATOR ( mgun2 , ON )
SWITCH_GENERATOR ( mgun3 , ON )
SWITCH_GENERATOR ( mguniacz , ON )
SWITCH_GENERATOR ( sg1 , ON )
SWITCH_GENERATOR ( sg2 , ON )
SWITCH_GENERATOR ( sg3 , ON )
SWITCH_GENERATOR ( sg4 , ON )
SWITCH_GENERATOR ( koka1 , ON )
SWITCH_GENERATOR ( koka2 , ON )
SWITCH_GENERATOR ( koka3 , ON )
SWITCH_GENERATOR ( koka4 , ON )
SWITCH_GENERATOR ( armor1 , ON )
SWITCH_GENERATOR ( armor2 , ON )
SWITCH_GENERATOR ( armor3 , ON )
SWITCH_GENERATOR ( armor4 , ON )


//bg

WHILE ( true = 1 )
//P1
// p1 bg phone1
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P1Once1 = 0 )
zbgp1 = CREATE_CHAR ( 121.0, 142.0 , 4.5 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
++P1Once1
ENDIF
ENDIF


// p1 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P1Once1 = 0 )
zbgp1 = CREATE_CHAR ( 143.0, 158.0 , 4.5 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
++P1Once1
ENDIF
ENDIF

// p1 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))
IF ( P1Once1 = 0 )
zbgp1 = CREATE_CHAR ( 145.0, 117.0 , 4.5 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
++P1Once1
ENDIF
ENDIF
// p1 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player1  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
IF ( P1Once1 = 0 ) 
zbgp1 = CREATE_CHAR ( 160.0, 132.0 , 4.5 ) 7 0 criminal END
SET_CHAR_THREAT_REACTION ( zbgp1 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( zbgp1 , line_of_sight )
GIVE_WEAPON ( zbgp1 , machine_gun )
ADD_GROUP_TO_CHARACTER ( zbgp1 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( zbgp1 , player1 )
++P1Once1
ENDIF
ENDIF

//P2
// p2 bg phone1

IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P2Once1 = 0 ) 
xbgp2 = CREATE_CHAR ( 121.0, 142.0 , 4.5 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
++P2Once1
ENDIF
ENDIF
// p2 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P2Once1 = 0 )   
xbgp2 = CREATE_CHAR ( 143.0, 158.0 , 4.5 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
++P2Once1
ENDIF
ENDIF

// p2 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))
IF ( P2Once1 = 0 )   
xbgp2 = CREATE_CHAR ( 145.0, 117.0 , 4.5 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
++P2Once1
ENDIF
ENDIF
// p2 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player2  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
IF ( P2Once1 = 0 )   
xbgp2 = CREATE_CHAR ( 160.0, 132.0 , 4.5 ) 10 0 criminal END
SET_CHAR_THREAT_REACTION ( xbgp2 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( xbgp2 , line_of_sight )
GIVE_WEAPON ( xbgp2 , machine_gun )
ADD_GROUP_TO_CHARACTER ( xbgp2 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( xbgp2 , player2 )
++P2Once1
ENDIF
ENDIF

//P3
// p3 bg phone1

IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P3Once1 = 0 )     
ybgp3 = CREATE_CHAR ( 121.0, 142.0 , 4.5 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
++P3Once1
ENDIF
ENDIF
// p3 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P3Once1 = 0 )     
ybgp3 = CREATE_CHAR ( 143.0, 158.0 , 4.5 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
++P3Once1
ENDIF
ENDIF

// p3 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))
IF ( P3Once1 = 0 )   
ybgp3 = CREATE_CHAR ( 145.0, 117.0 , 4.5 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
++P3Once1
ENDIF
ENDIF
// p3 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player3  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
IF ( P3Once1 = 0 )     
ybgp3 = CREATE_CHAR ( 160.0, 132.0 , 4.5 ) 13 0 criminal END
SET_CHAR_THREAT_REACTION ( ybgp3 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ybgp3 , line_of_sight )
GIVE_WEAPON ( ybgp3 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ybgp3 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ybgp3 , player3 )
++P3Once1
ENDIF
ENDIF

//P4
// p4 bg phone1

IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  119.5  , 137.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P4Once1 = 0 )     
ubgp4 = CREATE_CHAR ( 121.0, 142.0 , 4.5 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
++P4Once1
ENDIF
ENDIF
// p4 bg phone2
IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  140.5  , 158.5  ,  4.0  , 1.0 , 1.0  ))
IF ( P4Once1 = 0 )   
ubgp4 = CREATE_CHAR ( 143.0, 158.0 , 4.5 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
++P4Once1
ENDIF
ENDIF

// p4 bg phone3
IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  139.5 , 116.5 , 4.0  , 1.0 , 1.0  ))
IF ( P4Once1 = 0 )   
ubgp4 = CREATE_CHAR ( 145.0, 117.0 , 4.5 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
++P4Once1
ENDIF
ENDIF
// p4 bg phone4
IF (LOCATE_CHARACTER_ANY_MEANS ( player4  ,  161.5 , 136.5 , 4.0  , 1.0 , 1.0  ))
IF ( P4Once1 = 0 )   
ubgp4 = CREATE_CHAR ( 160.0, 132.0 , 4.5 ) 11 0 criminal END
SET_CHAR_THREAT_REACTION ( ubgp4 , react_as_normal )
SET_CHAR_THREAT_SEARCH ( ubgp4 , line_of_sight )
GIVE_WEAPON ( ubgp4 , machine_gun )
ADD_GROUP_TO_CHARACTER ( ubgp4 , 9 )
MAKE_NEW_LEADER_OF_GROUP ( ubgp4 , player4 )
++P4Once1
ENDIF
ENDIF

//p1 counter
IF ( HAS_CHARACTER_DIED ( player1 ) )
DELETE_ITEM ( zbgp1 )
IF ( P1Once1 = 1 )
SET P1Once1 = 0
ENDIF
ENDIF

//p2 counter
IF ( HAS_CHARACTER_DIED ( player2 ) )
DELETE_ITEM ( xbgp2 )
IF ( P2Once1 = 1 )
SET P2Once1 = 0
ENDIF
ENDIF

//p3 counter
IF ( HAS_CHARACTER_DIED ( player3 ) )
DELETE_ITEM ( ybgp3 )
IF ( P3Once1 = 1 )
SET P3Once1 = 0
ENDIF
ENDIF

//p4 counter
IF ( HAS_CHARACTER_DIED ( player4 ) )
DELETE_ITEM ( ubgp4 )
IF ( P4Once1 = 1 )
SET P4Once1 = 0
ENDIF
ENDIF

ENDWHILE


LEVELEND

//Thanks to:
//Salamander (DrSlony) |:| http://drslony.panopixel.org  |:|
//Arx
//CarThief


Thx ;]
Zobacz profil autora
CarThief
NL
NL


Dołączył: 02 Gru 2006
Posty: 155 Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Netherlands(AKA Holland) - NL

PostWysłany: Pią 17:23, 29 Sie 2008 Powrót do góry

Ah, just saw on GTAMP that its finnaly finished.
I suppose i'll go try it in a while, seems interesting.

And its something else then all the time those maps filled with rockets!

I wont be very active here as usual, so if you need me, i guess you can try emailing me. In any case faster response then the occasional check on this forum.
Zobacz profil autora
Wyświetl posty z ostatnich:      
Napisz nowy tematOdpowiedz do tematu


 Skocz do:   



Zobacz następny temat
Zobacz poprzedni temat
Możesz pisać nowe tematy
Możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001/3 phpBB Group :: FI Theme :: Wszystkie czasy w strefie CET (Europa)