17.06.2013, 16:02
Look , if player info pAdmin is in vehicle and if there is some passangers , everything they write will show to all players like in deatmatch , but if player is outside and if they write anything it will show in prox detector , i tryed to detect if player admin is in any car and to make prox detector , but that's not working ...
Here is the picture in car and outside of car ..
First picture is in car , and other is outside
Here is my part of OnPlayerText
I wanna make that if player is admin or if player is in car with admin , simply show message in prox detector , plase help?
Here is the picture in car and outside of car ..
First picture is in car , and other is outside
Here is my part of OnPlayerText
pawn Код:
if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
//if(PlayerInfo[playerid][pJailTime] >= 1 || PlayerInfo[playerid][pRobijaTime] >= 1) return SCM(playerid, COLOR_GREY, "Ne mozete to jer ste zatvoreni !");
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "{80C8FE}Stranac kaze: {FFFFFF}%s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
format(string, sizeof(string), "{C3C3C3}[%d] {80C8FE}%s kaze: {FFFFFF}%s", playerid, sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
new carid = GetPlayerVehicleID(playerid);
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424)
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "{80C8FE}Stranac kaze: {FFFFFF}%s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
format(string, sizeof(string), "{C3C3C3}[%d] {80C8FE}%s kaze: {FFFFFF}%s", playerid, sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "{C3C3C3}(Prozor zatvoren) {80C8FE}Stranac kaze: {FFFFFF}%s", text);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
format(string, sizeof(string), "{C3C3C3}[%d] (Prozor zatvoren) {80C8FE}%s kaze: {FFFFFF}%s", playerid, sendername, text);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "{FFFFFF}(ADMIN) {80C8FE}kaze: {FFFFFF}%s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
format(string, sizeof(string), "{C3C3C3}[%d] {FFFFFF}(ADMIN) {80C8FE}%s kaze: {FFFFFF}%s", playerid, sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
}
}
}