Originally Posted by ScottCFR
Under OnPlayerEnterVehicle. Look to see it the car is a ambulance, and see which team is entering.
|
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(gTeam[playerid] == TEAM_MEDIC && vehicleid == /*Put one of the cop cars vehicle ID's here*/)
{
new Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid, COLOR, "This is a police team vehicle!!");
}
return 1;
}
new Pos[3];
new Float:Pos[3];
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(gTeam[playerid] == TEAM_MEDIC && vehicleid == /*Put one of the cop cars vehicle ID's here*/) { new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); SendClientMessage(playerid, COLOR, "This is a police team vehicle!!"); } return 1; }
C:\DOCUME~1\Andrus\Desktop\ANDRUS~1\GAMEMO~1\rp.pwn(1162) : error 028: invalid subscript (not an array or too many subscripts): "gTeam" C:\DOCUME~1\Andrus\Desktop\ANDRUS~1\GAMEMO~1\rp.pwn(1162) : warning 215: expression has no effect C:\DOCUME~1\Andrus\Desktop\ANDRUS~1\GAMEMO~1\rp.pwn(1162) : error 001: expected token: ";", but found "]" C:\DOCUME~1\Andrus\Desktop\ANDRUS~1\GAMEMO~1\rp.pwn(1162) : error 029: invalid expression, assumed zero C:\DOCUME~1\Andrus\Desktop\ANDRUS~1\GAMEMO~1\rp.pwn(1162) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.