30.07.2010, 21:32
Ok so here it is, I am making it where if u enter a cop car and your not a police, you will teleport z+2.0, anyone?
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == 2)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 405)
{
GameTextForPlayer(playerid, "Civilian Vehicle", 3000, 3);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_WHITE, "You can start your engine by typing: /start");
return 1;
}
else if(GetVehicleModel(vehicleid) == 596)
{
new Float:x, Float:y, Float:z = SetPlayerPos(playerid,x,y,z);
if(gTeam[playerid] != POLICE) return SendClientMessage(playerid, COLOR_RED, "You are not a cop!") || SetPlayerPos(playerid,x,y,z+2.0);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_WHITE, "You can start your engine by typing: /start");
return 1;
}
return 1;
}
return 1;
}