SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 22/06/2019, 06:15 PM   #1
alvin6
Big Clucker
 
alvin6's Avatar
 
Join Date: Mar 2017
Posts: 52
Reputation: 2
Thumbs up How to make ZCMD command to highlight player marker

Hey there can anyone help me making /highlight command for players to highlight other players markers on map/radar?

Thanks
alvin6 is offline   Reply With Quote
Old 22/06/2019, 06:32 PM   #2
nbx2000
Big Clucker
 
Join Date: Dec 2016
Posts: 153
Reputation: 5
Default Re: How to make ZCMD command to highlight player marker

code ladmin
Code:
forward HighLight(playerid);
new BlipTimer[MAX_PLAYERS];
enum PlayerData
{
	blip,
	blipS
};
CMD:highlight(playerid, params[])
{
 	if(PlayerInfo[playerid][Levelchange here] < 2 && !IsPlayerAdmin(playerid))
	    return SendClientMessage(playerid, red, "ERROR: You are not a high enough level admin to use this command.");

	new player1, string[128];

    if(sscanf(params, "u", player1))
		return SendClientMessage(playerid,red,"USAGE: /highlight [playerid]");

	if(player1 == INVALID_PLAYER_ID)
	    return SendClientMessage(playerid, red, "ERROR: Player is not connected.");

 	switch(PlayerInfo[playerid][blip])
 	{
	    case 0:
	    {
			CMDMessageToAdmins(playerid,"HIGHLIGHT");
			PlayerInfo[player1][pColour] = GetPlayerColor(player1);
			PlayerInfo[player1][blip] = 1;
			BlipTimer[player1] = SetTimerEx("HighLight", 1000, 1, "i", player1);
			format(string, sizeof(string), "You have highlighted %s's marker", pName(player1));
		} 
		case 1:
		{
			KillTimer(BlipTimer[player1]);
			PlayerInfo[player1][blip] = 0;
			SetPlayerColor(player1, PlayerInfo[player1][pColour]);
			format(string, sizeof(string), "You have stopped highlighting %s's marker", pName(player1));
		}
	}
	SendClientMessage(playerid, yellow, string);
	return 1;
}

public HighLight(playerid)
{
	if(!IsPlayerConnected(playerid)) return 1;
	if(PlayerInfo[playerid][blipS] == 0) { SetPlayerColor(playerid, 0xFF0000AA); PlayerInfo[playerid][blipS] = 1; }
	else { SetPlayerColor(playerid, 0x33FF33AA); PlayerInfo[playerid][blipS] = 0; }
	return 0;
}
nbx2000 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] How to Make a Command That Bans an Offline Player [ZCMD + y_ini + Sscanf] gtakillerIV Tutorials 38 16/08/2015 12:37 PM
[FilterScript] Highlight player names on chat! fall3n Filterscripts 15 22/10/2014 02:08 PM
Make a player marker invisible Blademaster680 Scripting Help 5 09/10/2014 12:51 AM
[Tutorial] can anyone help me in this tutorial how to make player marker like this in picture Nasim Tutorials 4 27/07/2014 08:31 PM
Make player to teleport to marker map Fedee! Help Archive 9 24/02/2011 04:16 AM


All times are GMT. The time now is 12:22 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.