28.02.2012, 12:54
Hello. I am trying to make it says the owner of the vehicle when player enter it, but it's not working. All it says is: [SERVER]: This is Vehicle. instead of [SERVER]: This is OwnerName Vehicle.
My code of OnPlayerEnterVehicle is:
The file of one of the vehicles i am trying to enter is:
This is all self made codes.
Thank you.
My code of OnPlayerEnterVehicle is:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
format(file, sizeof(file), "RRP/vehicles/%d.ini", vehicleid);
if(fexist(file))
{
new string[128];
format(string, sizeof(string), "[SERVER]: This is %s vehicle.", dini_Int(file, "Owner"));
SendClientMessage(playerid, COLOR_LIGHTRED, string);
}
}
Код:
X=1965.977661 Y=1289.736816 Z=10.525081 A=355.682922 Model=560 Color1=1 Color2=1 Price=10000 Owner=Ricardo_Rodrigues Ownable=2 Lock=0 Weapon1=0 Weapon2=0 Weapon3=0 Weapon4=0 Weapon5=0 Materials=0
Thank you.