Вверх ко всем new
Code
new Kola_St;//имя машины
В public OnGameModeInit
Code
Kola_St = AddStaticVehicle(567,x,y,z,268.3306,3,3);//можеш свои поставить
В public OnPlayerStateChange
Code
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(vehicleid ==Kola_St)
{
if(strcmp(PlayerName(playerid), "Kola_St", true) != 0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xB50F00AA, "Этой машиной владеет Kola_St!.");
}
}
И куда-то засунь
Code
stock PlayerName(playerid)
{
new PlrName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlrName,sizeof(PlrName));
return PlrName;
}
только не в паблики
жду +