Big problem, please help me :( - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Big problem, please help me :( (
/showthread.php?tid=228777)
Big problem, please help me :( -
Randomai - 20.02.2011
There is zombie team and human team in my server.
I want that only humans can drive with cars.
zombies cant drive with cars.
some cars are broken and even humans cant drive.
Only thing is working that humans can go into police car[id 596], but zombies cant.
i got 0 problems, 0 errors when i compile, but it wont still work
Код:
#define TEAM_HUMAN 0
#define TEAM_ZOMBIE 1
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid) == 596 || (vehicleid) == 416)
{
if(PlayerTeam[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "This is one of the last working cars, you can use this vehicle to avoid the zombies.");
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "Brains....No brains heeere....");
}
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid) == 523 || (vehicleid) == 601)
{
if(PlayerTeam[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "Out of fuel or engine is broken, better find another car..");
RemovePlayerFromVehicle(playerid);
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "Brains....No brains heeere....");
}
}
}
}
Re: Big problem, please help me :( -
Randomai - 20.02.2011
after 1, 5h working, i solved it finally myself
im learning, sorry for posting so much questions here ^_^