2 Questions
#1

Hey , i got 2 quesstions :


1st - How to make when a player /enter in a Vehicle he Get Tp'ed inside with the Vehicle Too using Strcmp, i did the CMD but it only TP's the player


2nd - I Got /gate CMD's for LSPD Gates but it don't open when you do /gate - notthing happen , here is the LSPD gates code :


pawn Код:
if(strcmp(cmdtext, "/gate", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,9,1588.3058,-1637.9652,13.4227))
        { //POLICE GATE
            if(!IsACop(playerid)) return SendClientMessage(playerid,COLOR_GREY,"   You are not a Cop / FBI / SASD !");
            if(pdgategar==0)
            {
                pdgategar = 1;
                MoveObject(pdgaragegateobj, 1588.965698, -1637.882690, 7.710285, 1.50);
            }
            else if(pdgategar==1)
            {
                pdgategar = 0;
                MoveObject(pdgaragegateobj, 1588.965698, -1637.882690, 15.260185, 1.50);
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid,9,1544.4913,-1627.2817,13.3828))
        { //POLICE BAR
            if(!IsACop(playerid)) return SendClientMessage(playerid,COLOR_GREY,"   You are not a Cop / FBI / SASD !");
            if(pdgatebar==0)
            {
                pdgatebar = 1;
                SetObjectRot( pdbarriergateobj, 0.0000, 360.0000, 90.0000);
                SetObjectPos( pdbarriergateobj, 1544.682495, -1630.953003, 13.079567 );
            }
            else if(pdgatebar==1)
            {
                pdgatebar = 0;
                SetObjectRot( pdbarriergateobj, 0.0000, 90.0000, 90.0000);
                SetObjectPos( pdbarriergateobj, 1544.682495, -1630.980000, 13.215000 );
            }
        }
Reply
#2

1:
pawn Код:
//Inside your TP command
SetVehiclePos(GetPlayerVehicleID(playerid),xxx,yyy,zzz);//Change x, y, and z by your own variable
2:
Use debug to check wether the code called or not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)