24.05.2014, 16:16
I tested these two command in-game and they do set my name colour, but they don't set the blip on the radar.
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
if(SituationInProgress[playerid] == 1)
{
if((0 < PlayerInfo[playerid][pFaction] < 21) && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1)
{
SetPlayerMarkerForPlayer(forplayerid, playerid, 0x2641FEFF);
}
}
return 1;
}
CMD:57(playerid, params[])
{
new szString[165];
if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] != 1)
{
FactionOnly(playerid);
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "* This can only be used inside a vehicle.");
return 1;
}
if(SituationInProgress[playerid] == 0)
{
SituationInProgress[playerid] = 1;
foreach(new i : Player)
{
if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction])
{
SetPlayerMarkerForPlayer(playerid, i, 0x2641FEFF);
}
}
format(szString, sizeof(szString), "%s %s, 10-57, %s, over.", GetFactionRank(playerid), GetName(playerid), GetZone(playerid));
SendDispatchMessage(szString);
}
else
{
SituationInProgress[playerid] = 0;
foreach (new i : Player)
{
if(gPlayerLogged[i] == 1)
{
SetPlayerMarkerForPlayer(playerid, i, TEAM_HIT_COLOR);
SetPlayerColour(playerid);
}
}
format(szString, sizeof(szString), "%s %s, 10-99 on last 10-57, over.", GetFactionRank(playerid), GetName(playerid), GetZone(playerid));
SendDispatchMessage(szString);
}
return 1;
}
CMD:panic(playerid, params[])
{
new szString[128];
if(FactionInfo[PlayerInfo[playerid][pFaction]][fType] != 1)
{
FactionOnly(playerid);
return 1;
}
if(RequestingBackup[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED,"* You have already used your panic button in the last minute.");
return 1;
}
SetTimerEx("PanicReset", 60000, false, "d", playerid);
RequestingBackup[playerid] = 1;
foreach(new i : Player)
{
if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction])
{
SetPlayerMarkerForPlayer(playerid, i, 0xFF6347FF);
}
}
SendClientMessage(playerid,COLOR_LIGHTRED,"[Panic]{FFFFFF} You have activated your panic beacon.");
format(szString, sizeof(szString), "[COMM] %s %s has pressed %s panic button at %s, over.", GetFactionRank(playerid), GetName(playerid), GetZone(playerid));
return SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_DBLUE, szString);
}
forward PanicReset(playerid);
public PanicReset(playerid)
{
new str[128];
foreach (new i : Player)
{
if(gPlayerLogged[i] == 1)
{
SetPlayerMarkerForPlayer(playerid, i, TEAM_HIT_COLOR);
SetPlayerColour(playerid);
}
}
SendClientMessage(playerid,COLOR_LIGHTRED,"[Panic]{FFFFFF} Your panic beacon has been reset.");
RequestingBackup[playerid] = 0;
}