if(strcmp("/dm1", cmdtext, true, 10) == 0)
{
if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You are already in DM Area");
SetPVarInt(playerid, "skin", GetPlayerSkin(playerid));
SetPVarInt(playerid, "InDm", 1);
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "{FFFFFF}[SERVER]:{FF002B}%s has teleported to {FFFFFF}Deathmatch Area 1 - DM Area 1 (/dm1)",pName);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessage(playerid, COLOR_GREEN,"Welcome To DM Area");
GameTextForPlayer(playerid,"~w~Welcome To ~r~Death ~g~Match ~y~Area 1",3000,3);
SetPlayerPos(playerid,1050.6841,938.1620,18.5841);
SetPlayerFacingAngle(playerid,143);
ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,"Choose Your Team!","Team Xtreme Stunting Mafia\nTeam Xtreme Stunting Killers","Choose","Exit");
return 1;
}
i mean it when player is not dm and on dm area the player must be disappear and cant see the Player Arrow
|
So far I understood:
Everyone in your "DeathMatch Area", should Not be able to see the player markers(Map Icons) of anyone in the area. Is that correct or do you mean something else? About this line I do not understand what you are trying to say exactly.. Perhaps give us a few example with Red_Player, Blue_Player, Green_Player, Etc. This will possibly become easier for all the readers to understand your situation and help you faster. |
I was meaning that when player is not inside of DM he/she can not see the player and player arrow color
when he/she is on inside dm he can see the player and the player arrow thats what i mean |
public OnPlayerUpdate(playerid)
{
//IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
if(IsPlayerInRangeOfPoint(playerid, 100.0, 200.00, 200.00, 25.00))
{
// Make player 42 see player 1 as a red marker
SetPlayerMarkerForPlayer( 42, 1, 0xFF0000FF );
// Make the players marker an invisible white (chat will be white but marker will be gone).
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
// Make the players marker invisible to the player while keeping chat colour the same. Will only work correctly if SetPlayerColor has been used:
SetPlayerMarkerForPlayer( 42, 1, ( GetPlayerColor( 1 ) & 0xFFFFFF00 ) );
// Make the players marker fully opaque (solid) to the player while keeping chat colour the same. Will only work correctly if SetPlayerColor has been used:
SetPlayerMarkerForPlayer( 42, 1, ( GetPlayerColor( 1 ) | 0x000000FF ) );
}
}
if(strcmp("/dm1", cmdtext, true, 10) == 0)
{
if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You are already in DM Area");
SetPVarInt(playerid, "skin", GetPlayerSkin(playerid));
SetPVarInt(playerid, "InDm", 1);
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "{FFFFFF}[SERVER]:{FF002B}%s has teleported to {FFFFFF}Deathmatch Area 1 - DM Area 1 (/dm1)",pName);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessage(playerid, COLOR_GREEN,"Welcome To DM Area");
GameTextForPlayer(playerid,"~w~Welcome To ~r~Death ~g~Match ~y~Area 1",3000,3);
SetPlayerPos(playerid,1050.6841,938.1620,18.5841);
SetPlayerFacingAngle(playerid,143);
ShowPlayerDialog(playerid,9,DIALOG_STYLE_LIST,"Choose Your Team!","Team Xtreme Stunting Mafia\nTeam Xtreme Stunting Killers","Choose","Exit");
return 1;
}
So how I basicaly understood is, that when you are in the deathmatch you can see the player marker on the mini map and when you are outside you can't?
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer https://sampwiki.blast.hk/wiki/ShowPlayerMarkers If so just create: If(inDM == 1 ) { ShowPlayerMarkers(1); } else { //nothing here, that means the markers don't show //or just ShowPlayerMarkers(0); } |