entergarage pwnt - 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)
+--- Thread: entergarage pwnt (
/showthread.php?tid=518048)
entergarage pwnt -
Laure - 08.06.2014
Hey, tried to make a command to enter a player or player along with their car inside their garage, doesnt seem to work.
How ever i am in a vehicle when i attempt the command , all it does is tp's only me in the garage and i cant see my vehicle, also i can see the minimap means it also sets my interior to 0. There's the command.
pawn Код:
CMD:entergarage(playerid, params[])
{
for (new idx = 0; idx < sizeof (GarageInfo); idx++)
{
if(IsPlayerInRangeOfPoint(playerid, 2, GarageInfo[idx][gX], GarageInfo[idx][gY], GarageInfo[idx][gZ]))
{
if(!GarageInfo[idx][gStatus] && PlayerInfo[playerid][pGarage] != idx && PlayerInfo[playerid][pVGarage] != idx) return SendClientMessage(playerid, COLOR_GREY, "This garage is locked by its owner.");
new string[128], seat;
format(string, sizeof(string), "** %s pushes the shutter and enters the garage.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
if(GarageInfo[idx][gLevel] == 1 && !IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid, -73.0052,-18.5942,972.5516);
SetPlayerFacingAngle(playerid, 6.7155);
SetPlayerInterior(playerid, 14);
SetPlayerVirtualWorld(playerid, idx+500);
}
else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new carid = GetPlayerVehicleID(playerid);
SetVehiclePos(carid, -73.0052,-18.5942,972.5516);
SetVehicleZAngle(carid, 6.7155);
LinkVehicleToInterior(carid, 14);
PutPlayerInVehicle(playerid, carid, seat);
SetVehicleVirtualWorld(carid, idx+500);
}
SetCameraBehindPlayer(playerid);
break;
}
}
return 1;
}
Re: entergarage pwnt -
Laure - 08.06.2014
Help?
Re: entergarage pwnt -
Aerotactics - 08.06.2014
Quote:
Originally Posted by Imperor
Help?
|
pawn Код:
COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE
I just have one thing to point out, COLOR_PURPLE.
OT: It took me a while but I found the problem:
pawn Код:
PutPlayerInVehicle(playerid, carid, seat);
You never defined what the seat is.
Re: entergarage pwnt -
Laure - 08.06.2014
Whats there?, I am using zG script its everywhere there where it sends nearby message.
Re: entergarage pwnt -
Aerotactics - 08.06.2014
Quote:
Originally Posted by Imperor
Whats there?, I am using zG script its everywhere there where it sends nearby message.
|
Edited previous post.
Re: entergarage pwnt -
Laure - 08.06.2014
It was a problem before adding PutPlayerInVehicle.
Re: entergarage pwnt -
Laure - 08.06.2014
BUMP
Re: entergarage pwnt -
Laure - 09.06.2014
24 hours now, BUMP
Re: entergarage pwnt -
Laure - 10.06.2014
24 Hours again, BUMP