12.06.2014, 14:03
(
Последний раз редактировалось finelaq; 14.06.2014 в 11:48.
)
Hello!
Today i have problem with team cars.
This https://sampforum.blast.hk/showthread.php?tid=160810 - this https://sampforum.blast.hk/showthread.php?tid=419713 and this https://sampforum.blast.hk/showthread.php?tid=300316 dosen't help me!!
My problem is that, when im civilian and i enter to police car i can drive it but i don't want that...
So here is my script: (in estonian)
umm... no errors! Just dosen't work. yep...
Today i have problem with team cars.
This https://sampforum.blast.hk/showthread.php?tid=160810 - this https://sampforum.blast.hk/showthread.php?tid=419713 and this https://sampforum.blast.hk/showthread.php?tid=300316 dosen't help me!!
My problem is that, when im civilian and i enter to police car i can drive it but i don't want that...
So here is my script: (in estonian)
pawn Код:
// First the teams!
new gTeam[MAX_PLAYERS];
#define TSIVIIL 0
#define BALLAD 1
#define GROVE 2
#define VAGOS 3
#define RUSSIAN 4
#define AZTECAS 5
#define POLITSEI 6
#define MAFIA 7
#define CHERIFF 8
#define SWAT 9
#define SOJAVAGI 10
#define CIA 11
// Then cars
enum TeamCars
{
LSPD,
Mafia
}
new Cars[TeamCars];
public OnGameModeInit()
{
Cars[LSPD] = CreateVehicle(401,2251.7415,2476.0071,10.5993,1.2631,52,52,900); // LSPD 1
Cars[LSPD] = CreateVehicle(401,2255.8970,2476.3103,10.5995,0.5224,52,52,900); // LSPD 2
Cars[LSPD] = CreateVehicle(401,2260.5508,2475.9434,10.5994,0.9976,52,52,900); // LSPD 3
Cars[LSPD] = CreateVehicle(401,2260.5461,2460.9810,10.5996,358.9507,52,52,900); // LSPD 4
Cars[LSPD] = CreateVehicle(401,2255.9341,2459.5439,10.5996,359.6339,52,52,900); // LSPD 5
Cars[LSPD] = CreateVehicle(401,2251.6504,2458.6802,10.5993,359.5941,52,52,900); // LSPD 6
Cars[LSPD] = CreateVehicle(401,2251.5488,2444.1545,10.5999,359.5937,52,52,900); // LSPD 7
Cars[LSPD] = CreateVehicle(401,2255.6819,2443.7505,10.5997,357.4008,52,52,900); // LSPD 8
Cars[LSPD] = CreateVehicle(401,2260.6716,2444.4990,10.5998,2.3976,52,52,900); // LSPD 9
return 1;
}
// Then that
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[LSPD] )
{
if(gTeam[playerid] != POLITSEI)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "[LSPD] - Sa ei ole politseinik!");
return 1;
}
else
{
return 1;
}
}
VehicleModel[playerid] = GetVehicleModel(GetPlayerVehicleID(playerid));
ShowGameTextForPlayer(playerid);
SendClientMessage(playerid,COLOR_GREEN,"Sa sisenesid autosse! Vajuta number 2 , et masinat parandada & flippida!");
return 1;
}
if(newstate != PLAYER_STATE_DRIVER && (oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)) KillTimer(CFCTimer);
return 1;
}