25.12.2010, 16:09
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
what is wrong?
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
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++;
}
}