19.11.2010, 09:52
Hello. I have made a script which will load seperate files of a player. It seems to read the file and spawn the car, but I can't make it compare the owner's name with the user's name, if you get what I mean.
I want it to send you a message if you enter your OWN car.
I am currently using this code:
It doesn't work. So basically I want it to check if you're the owner of that car. It doesn't give errors, it compiles successfully.
I hope you can help me.
I want it to send you a message if you enter your OWN car.
I am currently using this code:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new pname[255];
for(new i; i < sizeof(COwnerData); i++)
{
if(COwnerData[i][CarOwner] == GetPlayerName(playerid, pname, sizeof(pname))) {
SendClientMessage(playerid, COLOR_WHITE, "You entered your own car.");
}
}
I hope you can help me.