How to make this?
#1

How can I make if player is in car with closed windows ( I have /windows command for that) he won't see any msg from ppl that are outside of car? I'm using prox detector but I guess prox detector can be seen by everyone..
Reply
#2

I think that's kinda impossible, but i'm not a pro
Reply
#3

You can just get like if the windows are closed, then clear chat for player after some interval of time and if it isn't, then it will be default.
Reply
#4

It's very simple, Use radius and define if windows closed or not, It is already in some RP Servers
Reply
#5

I was thinking about using loop, player's state = ON FOOT, and if player is near player that is writing then he will get message something like this so ony players ON FOOT will get that message then I need to detect vehicles without roof and bikes and so on.. so those players will receive message also, but I need to get some help from more experienced scripters if it's possible and if I'm even thinking in right way ^^
Reply
#6

Quote:
Originally Posted by Clad
Посмотреть сообщение
It's very simple, Use radius and define if windows closed or not, It is already in some RP Servers
pawn Код:
enum Car
{
    Float:F, // Fuel - don't mind this right now...
    VehWin, // Windows
}
pawn Код:
if(!strcmp(cmdtext, "/windows", true) || !strcmp(cmdtext, "/wi", true))
    {
        new string[128];
        new playercar = GetPlayerVehicleID(playerid);
        GetPlayerName(playerid, Name, sizeof(Name));
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1,"{FF6A22}INFO: {FFFFFF}You need to be a driver to use this command.");
            if(IsModelAPlane(playercar) || IsModelABike(playercar) || IsModelAHeli(playercar) || IsModelABoat(playercar) || IsModelASpecial(playercar))
            {
                SendClientMessage(playerid, -1, "{FF6A22}INFO: {FFFFFF}This vehicle doesn't have the window to roll.");
                return 1;
            }
            if(Carinfo[vehicleid][VehWin] == 0) // if windows are closed we will open them
            {
                Carinfo[vehicleid][VehWin] = 1;
                format(string, sizeof(string), "* %s rolls down the window.", Name);
                ProxDetector(30.0, playerid, string, COLOR_DBLUE,COLOR_DBLUE,COLOR_DBLUE,COLOR_DBLUE,COLOR_DBLUE);
                return 1;
            }
            else if(Carinfo[vehicleid][VehWin] == 1) // if windows are open we will close them
            {
                Carinfo[vehicleid][VehWin] = 0;
                format(string, sizeof(string), "* %s rolls up the window.", Name);
                ProxDetector(30.0, playerid, string, COLOR_DBLUE,COLOR_DBLUE,COLOR_DBLUE,COLOR_DBLUE,COLOR_DBLUE);
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "{FF6A22}INFO: {FFFFFF}You need to be in the vehicle to use this function!");
            return 1;
        }
        return 1;
    }
This is what I'm currently using but idk how to combine all this in OnPlayerText .. I will need some help hah :P thanks for answers also
Reply
#7

Use vehicle models for detect bikes or cars, It won't take you much time
Reply
#8

Код:
if(Carinfo[vehicleid][VehWin] == 0)
from this you can make it receive message or not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)