29.10.2012, 12:28
Team Cars Problem! Everything is compiling and i think it works but it doesnt WORK!
I think problem is somewhere in PlayerStateChange help me :<
Pastebin
I think problem is somewhere in PlayerStateChange help me :<
Pastebin
pawn Код:
#define CORLEONE 3
enum TeamCars
{
Corleone
}
new Cars[TeamCars];
Cars[Corleone] = CreateVehicle(545,488.6407,-1498.9587,20.2783,351.7271,0,0,120); // Corleone Car 1
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[Corleone])
{
if(gTeam[playerid] == CORLEONE)
{
SendClientMessage(playerid,COLOR_GREEN, "You are now driving the Grove Car!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You do not have the keys for this car!");
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}