26.01.2010, 15:38
I have two teams on my server,
One cops, And one crooks,
I want to make it so if you get in a copcar,
And your a cop, It runs the engine system,
But if im a crook, It asks me to hotwire the vehicle,
Ive done it right, But it says Hotwire and engine start,
How to get it to just say Hotwire![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
My code:
One cops, And one crooks,
I want to make it so if you get in a copcar,
And your a cop, It runs the engine system,
But if im a crook, It asks me to hotwire the vehicle,
Ive done it right, But it says Hotwire and engine start,
How to get it to just say Hotwire
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
![Huh?](images/smilies/confused.gif)
My code:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsACopCar(vehicleid))
{
if(GetPlayerTeam(playerid) == TEAM_COPLS)
{
SendClientMessage(playerid, GREEN, "You are in a cop car");
}
else
{
SendClientMessage(playerid, RED, "To hotwire this vehicle Press (Right Mouse Button)");
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(Engine[vehicleid] == 0)
{
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, YELLOW, "Press (Shift) or Type (/engine) to start the vehicles engine");
}
else if(Engine[vehicleid] == 1)
{
SendClientMessage(playerid, GREEN, "Engine Running...");
}
else if(GetPlayerTeam(playerid == 2))
{
if(IsACopCar(vehicleid))
{
SendClientMessage(playerid, YELLOW, "Vehicle Name: Police Car LS");
}
}
}
return 1;
}