SA-MP Forums Archive
Vehicle For A Name Only - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle For A Name Only (/showthread.php?tid=202928)



Vehicle For A Name Only - eDz0r - 25.12.2010

Hmm.... i'm working at a vehicle system but i stuck on this thing
It's just remove me from vehicle and it say "This Is A Private Vehicle"
I extract the owner name from a file
Код:
411|2039.9105|1335.5576|10.2414|180.0000|-1|-1|20|0|eDz0r
what is wrong?

pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
new vID, pName[MAX_PLAYERS], vOwnerString[32];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(vOwnerString, sizeof vOwnerString, "%s", VehicleInfo[vID][vOwner]);

while (vID < sizeof(VehicleInfo))
{
if(GetPlayerVehicleID(playerid) == VehicleInfo[vID][vVehID])
{
if(strcmp(pName, vOwnerString, true) == 0)
{
SendClientMessage(playerid, SYSTEMSUCESSFULL_COLOR, "This Is Your Private Vehicle");
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, SYSTEMERROR_COLOR, "This Is A Private Vehicle");
}
}
vID++;
}
}