Simple Help
#3

PHP код:
CMD:respawnvehicletome(playeridparams[])
{
    if(!
found) return SendClientMessage(playeridCOLOR_RED"You don't have any vehicles!");
    if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_RED"You can only use this command outside the vehicle!");
    new 
bool:found;
    new 
Float:VehA;
    new 
Float:PlayerXFloat:PlayerYFloat:PlayerZ;
    for(new 
i=1MAX_DVEHICLESi++)
    {
        if(
VehicleCreated[i] == VEHICLE_PLAYER && strcmp(VehicleOwner[i], playername) == 0)
        {
            
found true;
            
GetVehicleZAngle(currentvehVehA);
            
GetPlayerPos(playeridPlayerXPlayerYPlayerZ);
            
SetVehiclePos(// Owned Vehicle Variable /*, PlayerX+15, PlayerY, PlayerZ+5); 
            
SetVehicleZAngle(// Owned Vehicle Variable /*, VehA+90);
            
LinkVehicleToInterior(// Owned Vehicle Variable /*, GetPlayerInterior(playerid));
            
SetVehicleVirtualWorld(// Owned Vehicle Variable /*, GetPlayerVirtualWorld(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"You have successfully teleport your vehicle to your position!");
        }
     return 
1;

Well , It's up to you to edit. More vehicle = More vehicle to teleport to you.And Correct me if i'm wrong, there is no pawno here.

P.S:Next time , please read the rules! and Post in right section.
Reply


Messages In This Thread
Simple Help - by bugmenotlol - 05.03.2016, 09:26
Re: Simple Help - by xEF - 05.03.2016, 09:35
Re: Simple Help - by MicroKyrr - 05.03.2016, 10:18
Re: Simple Help - by bugmenotlol - 05.03.2016, 11:45
Re: Simple Help - by bugmenotlol - 05.03.2016, 11:48
Re: Simple Help - by MicroKyrr - 05.03.2016, 11:50
Re: Simple Help - by bugmenotlol - 05.03.2016, 12:06
Re: Simple Help - by MicroKyrr - 05.03.2016, 12:58
Re: Simple Help - by bugmenotlol - 05.03.2016, 14:20
Re: Simple Help - by SyS - 05.03.2016, 14:21

Forum Jump:


Users browsing this thread: 1 Guest(s)