В OnPlayerCommandText
Code
if(strcmp(cmd, "/invVeh", true) == 0 && (iPlayerRoles[playerid] == 2||tmpPrem[playerid] == 1||(tmpAdmin[playerid]==1&&admin[playerid]==1)||IsPlayerAdmin(playerid)))
{
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;
}