22.02.2014, 21:29
Hello,
I am trying to make this message appear with the correct infomation but it doesnt work.
What this basically is supposed to do is when a player enters a car he gets a message "You have entered a "CArname"(Carid). Owner: "Car Owner"" but it prints out "You Entered a Infernus(0). Owner: " Owner field should display my name but it doesnt and the car id should be 315 but it prints 0
I am trying to make this message appear with the correct infomation but it doesnt work.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new id, string[128];
id = GetVehicleModel(GetPlayerVehicleID(playerid));
for(new a; a < MAX_VCARS; a++)
{
format(string, sizeof(string), "You Entered a %s(%d). Owner: %s", VehicleNames[id - 400],sInfo[a][ID],sInfo[a][vOwner]);
}
SendClientMessage(playerid,COLOR_ADMSININE,string);
return 1;
}
}