Nu te inregistra daca esti idiot sau agramat!
AlphaCS.RO[ORIGINAL GAMING]
Thanks:
0
Likes:
0
-
[Tutorial] Create Police light for vehicle
PHP Code:
new PoliceLightObj[MAX_PLAYERS]; // under the script
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(IsValidObject(PoliceLightObj[playerid]) == 0)//add vehicle light after player sit in vehicle
{
PoliceLightObj[playerid] = CreateObject(18646,0.0,0.0,0.0,0.0000000,0.0000000 ,0.0000000);
AttachObjectToVehicle(PoliceLightObj[playerid], GetPlayerVehicleID(playerid), 0.0, 0.0, 0.8, 0.0, 0.0, 0.0);
}
//if you wont add police light only for cops, you can create player team check like this
/*
if(IsValidObject(PoliceLightObj[playerid]) == 0)//add vehicle light after player sit in vehicle
{
if(PLAYERTEAM == COP)
{
PoliceLightObj[playerid] = CreateObject(18646,0.0,0.0,0.0,0.0000000,0.0000000 ,0.0000000);
AttachObjectToVehicle(PoliceLightObj[playerid], GetPlayerVehicleID(playerid), 0.0, 0.0, 0.8, 0.0, 0.0, 0.0);
}
}
// PLAYER TEAM can be fucn SetPlayerTeam if you use this func you should add this... if(GetPlayerTeam(playerid) == 1) ( 1 its for example number of cop team)
*/
}
if(oldstate == PLAYER_STATE_DRIVER)
{
if(IsValidObject(PoliceLightObj[playerid]) == 1) DestroyObject(PoliceLightObj[playerid]);//delete police light when player exit from vehicle
}
return 1;
}
__________________
WWW.SAMP-GAMING.COM
**** [COD] Call Of Duty - Ghosts **** - 91.121.97.26:7820
[FS] Info about opponent! Help to kill!
[FS] Improved Damage (WITH SPECIAL EFFECTS)
[FS] FireNitro
[FS] Question Calculator Game
Similar Threads
-
By SergiuOfficial in forum Tutoriale
Replies: 0
Last Post: 27-08-17, 10:12
-
By SergiuOfficial in forum Tutoriale
Replies: 0
Last Post: 27-07-17, 21:51
-
By SergiuOfficial in forum Tutoriale
Replies: 0
Last Post: 22-06-17, 22:29
-
By SergiuOfficial in forum Tutoriale
Replies: 0
Last Post: 05-06-17, 17:58
-
By SergiuOfficial in forum Tutoriale
Replies: 0
Last Post: 20-05-17, 08:03
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules