11.11.2011, 05:27
(
Последний раз редактировалось Padarom; 11.11.2011 в 14:45.
)
Hello,
I haven't written a carlock-system before, but now I need one and have quite a big problem.
When vehicles are loaded (out of .ini files) their variable "besitzer" (= owner) are set (either a number, which stands for an airline-id - or a name, which stands for a private owner). My problem at the moment is, that vehicles are not opened to anyone. Neither if I'm airline-member, nor if I'm the private owner of the vehicle.
Then I've printed out OnVehicleStreamIn Autozeug[vehicleid][besitzer]. The result was the following:
I also printed out the owner on the carspawn, but everything was fine there.
So I wonder where these special characters come from. Also the true owner is a little bit mixed up with other player-names from the server (As you can see above)
I hope you can help me.
Regards
Padarom
I haven't written a carlock-system before, but now I need one and have quite a big problem.
When vehicles are loaded (out of .ini files) their variable "besitzer" (= owner) are set (either a number, which stands for an airline-id - or a name, which stands for a private owner). My problem at the moment is, that vehicles are not opened to anyone. Neither if I'm airline-member, nor if I'm the private owner of the vehicle.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
if(Autozeug[vehicleid][locked] == true)
{
new name[24];
GetPlayerName(forplayerid,name,24);
if(Spieler[forplayerid][airline] == Autozeug[vehicleid][besitzer] || !strcmp(name,Autozeug[vehicleid][besitzer])) SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
else SetVehicleParamsForPlayer(vehicleid,forplayerid,0,1);
}
return 1;
}
// OnPlayerSpawn:
for(new i=0; i<MAX_VEHICLES; i++)
{
if(!strcmp(Autozeug[i][besitzer],name)) SetVehicleParamsForPlayer(i,playerid,0,0);
}
Код:
[19:16:32] Owner: 2 [19:16:32] Owner: PdTrFeFeMkCoMyken [19:16:32] Owner: FeMkCoMyken [19:16:32] Owner: MkCoMyken [19:16:32] Owner: CoMyken
So I wonder where these special characters come from. Also the true owner is a little bit mixed up with other player-names from the server (As you can see above)
I hope you can help me.
Regards
Padarom