29.04.2012, 01:05
hi guys, i want wen player enters any vehicle, it say "drive safely!"
how i do this?
how i do this?
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[128];
format(string, sizeof(string), "You are entering vehicle %i",vehicleid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, -1, "Drive Safety!");
}
return 1;
}
#define COLOR_GREEN 0x33AA33AA
//Add the above line on the top of all the other color definitions.
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid, COLOR_GREEN, "Drive Safely!");
GameTextForPlayer(playerid, "~g~Drive Safely", 1000, 3);
}
return 1;
}