1 post in this topic

Как из названия ясно, команда сделает невидимым ваш автомобиль (переместит его в другой интерьер короче).

В OnPlayerCommandText.

Спойлер

if(strcmp(cmd, "/invVeh", true) == 0)
{
        new tmp[255];
        tmp = strtok(cmdtext, idx);
        if(strlen(tmp)&&IsPlayerNPC(strval(tmp))) return 1;
        if(!strlen(tmp))        SendClientMessage(playerid,COLOR_WHITE," Использование: /invVeh ID");
        else
        {
                if(!IsPlayerConnected(strval(tmp)))     SendClientMessage(playerid,COLOR_WHITE," Неверный ID.");
                else
                {
                        if(IsPlayerInAnyVehicle(strval(tmp)))
                        {
                                LinkVehicleToInterior(GetPlayerVehicleID(strval(tmp)),100);
                                SendClientMessage(playerid,COLOR_WHITE," Выполнено.");
                        }
                        else
                        {
                                SendClientMessage(playerid,COLOR_WHITE,"Игрок не в авто.");
                                return 1;
                        }
                }
        }
        return 1;
}

 

Автор: ReSLeaR-

Edited by stibs

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0