14.02.2016, 09:59
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(carros2,sizeof(carros2),"carros/%s.txt", aname);
new vid;
vid = GetPlayerVehicleID(playerid);
if(DOF2_FileExists(carros2))
{
if(vid == Info[playerid][CarDono])
{
format(msg,sizeof(msg),"{76EE00}| INFO | Bem-Vindo ao seu veнculo %s",aname);
SendClientMessage(playerid,-1,msg);
}
else
{
SendClientMessage(playerid,-1,"| ERRO | Esse veнculo nгo pertence a vocк.");
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}
http://prntscr.com/a32u6m