SA-MP Forums Archive
Garage , help me . - 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: Garage , help me . (/showthread.php?tid=286792)



Garage , help me . - moadi - 30.09.2011

I'm trying to script a garage , i know how to do everything except TP'ing the player while hes inside the vehicle when he uses the CMD , i mean is there a script to TP the player and his vehicle while hes driving it?


Re: Garage , help me . - Ehab1911 - 30.09.2011

pawn Code:
if(strcmp(cmdtext, "/PUTYOURCOMMANDHERE", true) == 0){
        {if(State!=PLAYER_STATE_DRIVER)
        {SetPlayerPos(playerid,POSITIONOFYOURGARAGEINTERIOR);}
        else if(IsPlayerInVehicle(playerid, cartype) == 1)
        {SetVehiclePos(cartype,POSITIONOFYOURGARAGEINTERIOR);
        SetVehicleZAngle(cartype,SETYOURVEHICLE'SANGELHERE);}
        else
        {SetPlayerPos(playerid,POSITIONOFYOURGARAGEINTERIOR);}
        SendClientMessage(playerid, 0xFFFF00AA,"You have teleported to GARAGE.");}
        return 1;}