31.03.2016, 12:57
I am working on a Window System for my roleplay server.
I was having an issue, When one of the windows are up it works fine (like it suppose to do).
When all of the windows are closed, I tried sending a chat but it won't send. I am pretty sure it has something to do with IsPlayerInVehicle but I don't know what to do with it nor what code to replace on it.
Any help would be appreciated.
I was having an issue, When one of the windows are up it works fine (like it suppose to do).
When all of the windows are closed, I tried sending a chat but it won't send. I am pretty sure it has something to do with IsPlayerInVehicle but I don't know what to do with it nor what code to replace on it.
Any help would be appreciated.
PHP код:
new driver, passenger, left, right2;
if(IsPlayerInAnyVehicle(playerid))
{
GetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), driver, passenger, left, right2);
if(driver == 0 || passenger == 0 || left == 0 || right2 == 0)
{
format(string, sizeof(string), "%s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
else if(driver == 1 && passenger == 1 && left == 1 && right2 == 1)
{
format(string, sizeof(string), "(Vehicle) %s says: %s", sendername, text);
foreach(new i : Player)
{
if(IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)))
{
SendClientMessageEx(i, -1, string);
}
}
format(string, sizeof(string), "(mumble) %s", text);
SetPlayerChatBubble(playerid,string,COLOR_WHITE,20.0,5000);
}
}
else
{
format(string, sizeof(string), "%s says: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}