20.11.2011, 14:19
I'm using vehicle system, when you buy a vehicle it creates a file with your name, what do i have to add to this script below so that it checks if this is your vehicle and if not it removes you?
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
new file[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"Cars/%s.ini",name);
if(dini_Exists(file))
{
return 1;
}
return 0;
}