HELP! [How can i create Gang Cars?] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELP! [How can i create Gang Cars?] (
/showthread.php?tid=282084)
HELP! [How can i create Gang Cars?] -
Santox14 - 09.09.2011
PHP код:
// Kilo Tray Ballas
if(classid == 0)
{
gTeam[playerid] = TEAM_KTB;
GameTextForPlayer(playerid,"~w~Kilo Tray Ballas",3000,5);
SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909);
SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
SetPlayerFacingAngle(playerid,122.4500);
SetPlayerColor(playerid,0xA000FFFF);
}
This is how i define my gangs.
Hope you can help me

!
Re: HELP! [How can i create Gang Cars?] -
Jack_Leslie - 09.09.2011
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(vehid == vehid)
{
if(gTeam[playerid] != TEAM_KTB)
{
RemovePlayerFromVehicle(playerid);
}
else { }
}
}
return 1;
}
Un-tested