17.04.2011, 07:16
How could I get it so that when a player enters a vehicle, a message comes up saying:
"Use /eon to turn on the vehicles engine!"
Thank you!
"Use /eon to turn on the vehicles engine!"
Thank you!
OnPlayerEnterVehicle(..)
{
SendClientMessage(playerid, color, "Type /eon to turn on the vehicle's engine!");
return 1;
}
pawn Код:
|
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
{
SendClientMessage(playerid, WHITE, "Type /eon to turn on the vehicle's engine!");
return 1;
}
new model = GetVehicleModel(vehicleid);
if(model == 596)
{
Player[playerid][GotInCopCar]++;
ResetPlayerWeapons(playerid);
GivePlayerSavedWeapons(playerid);
}
return 1;
}
pawn Код:
|
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if ((newstate == PLAYER_STATE_DRIVER) && (oldstate == PLAYER_STATE_ONFOOT))
{
SendClientMessage(playerid, -1, "Type /eon to turn on the vehicle's engine!");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid)
{
//The message here
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
//The message here
}
return 1;
}
if(newstate == 2)
{
SendClientMessage(playerid, WHITE, "Type /eon to turf on the vehicle's engine!");
}
return 1;
}
C:\Documents and Settings\Callum\Desktop\lvrp\Windows\gamemodes\Vor texRoleplay.pwn(26412) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. pawn Код:
|
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new model = GetVehicleModel(vehicleid);
if(model == 596)
{
Player[playerid][GotInCopCar]++;
ResetPlayerWeapons(playerid);
GivePlayerSavedWeapons(playerid);
}
SendClientMessage(playerid, WHITE, "Type /eon to turn on the vehicle's engine!");
return 1;
}
Try:
pawn Код:
|