Carsystem problem (/towpark only in his own car) - 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: Carsystem problem (/towpark only in his own car) (
/showthread.php?tid=133217)
Carsystem problem (/towpark only in his own car) -
gtazogger - 11.03.2010
Hello,
I have a problem, and I do not get it resolved
So I tried it here scripts
/towpark => park the vehicle on the tow place
/towfree => How can the player whose car was towed, redeem it again
So now the problem:
/towfree is working very good !
But / towpark goes only by his own car.
I use this Carsystem (I have it installed in my Godfather script, and everything is going perfectly!):
http://forum.sa-mp.com/index.php?topic=78765.0
Here is the command:
Code:
if(strcmp(cmd,"/towpark",true) == 0)
{
if(!IsAnOrdnung(playerid))
{
SendClientMessage(playerid, COLOR_GRAD3, " Du bist kein Ordnungsamt");
return 1;
}
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
{
GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][CarPos_x],Carlist[playerid][CarPos_y],Carlist[playerid][CarPos_z]);
GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][CarRotate]);
Carlist[playerid][TowPark]=1;
SendClientMessage(playerid, COLOR_GREEN, "Fahrzeug erfolgreich auf dem Verwahrplatz geparkt !");
}
else { SendClientMessage(playerid, COLOR_GREY, "Du bist in keinem Auto !"); }
return 1;
}
The problem should be because:
Code:
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
{
GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][CarPos_x],Carlist[playerid][CarPos_y],Carlist[playerid][CarPos_z]);
GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][CarRotate]);
Carlist[playerid][TowPark]=1;
The [playerid] is it ?
But how can i fix it?
Plz help me !
Thx !
Re: Carsystem problem (/towpark only in his own car) -
gtazogger - 12.03.2010
//phus
Plz help !
Re: Carsystem problem (/towpark only in his own car) -
gtazogger - 12.03.2010
I have fix it !
Answer in the German SA:MP Board :P
Please close !