SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 21/04/2015, 08:48 PM   #1
PSYCHOBABYKILLA
Big Clucker
 
Join Date: Mar 2015
Posts: 74
Reputation: 3
Default other players cant see special action

well i use this special action

SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMO KE_CIGGY);

i always test everything on 2 computers to make sure it works and i can that you cannot see the player smoking on the other computer but when im smoking i can see it on my screen
PSYCHOBABYKILLA is offline   Reply With Quote
Old 21/04/2015, 09:00 PM   #2
Jimmy0wns
Gangsta
 
Join Date: Sep 2012
Location: Netherlands
Posts: 686
Reputation: 208
Default Re: other players cant see special action

Where exactly did you put this?
Jimmy0wns is offline   Reply With Quote
Old 21/04/2015, 09:27 PM   #3
Sithis
Gangsta
 
Join Date: Mar 2013
Location: the Netherlands
Posts: 887
Reputation: 79
Default Re: other players cant see special action

Please show your code, that way we can help you.
__________________
Developer and owner of https://trinityrpg.com
Sithis is offline   Reply With Quote
Old 21/04/2015, 10:02 PM   #4
PSYCHOBABYKILLA
Big Clucker
 
Join Date: Mar 2015
Posts: 74
Reputation: 3
Default Re: other players cant see special action

Code:
dcmd_takedrugs(playerid, params[])
{
	if (PlayerInfo[playerid][pSpawn] == 1){

	if (PlayerInfo[playerid][pTeam] == TEAM_CIVILIAN && PlayerInfo[playerid][pVigilante] == 0){

	new idx,amount,string[256],tmp[256];


	tmp = strtok(params, idx);

	if(!strlen(tmp))
	{
	SendClientMessage(playerid, COLOR_ERROR, "USAGE: /takedrugs (qty).");
	return 1;
	}

	if(!isNumeric(tmp))
	{
	SendClientMessage(playerid, COLOR_ERROR, "Invalid Amount.");
	return 1;
	}

	amount = strval(tmp);


	if (PlayerInfo[playerid][pDrugs] < amount)
	{
	format(string, sizeof(string), "You Do Not Have Enough Drugs.  You Are Carrying %d Grams Of Drugs.",PlayerInfo[playerid][pDrugs]);
	SendClientMessage(playerid,COLOR_ERROR, string);
	return 1;
	}

	if (amount < 1 || amount > 200)
   	{
	format(string, sizeof(string), "Invalid Drug Quantity. Enter an Amount of Grams of Drugs to Take Between 1 and 200.  (Carrying %d Grams)",PlayerInfo[playerid][pDrugs]);
	SendClientMessage(playerid, COLOR_ERROR, string);
	return 1;
	}


	SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
	PlayerInfo[playerid][pDrugs] -= amount;


	PlayerInfo[playerid][pDrugTime] = amount * 10;


	SendClientMessage(playerid,COLOR_SERVER_HELP_MSG, "You Are On Drugs.  Your Health Will Refill Automatically.");
	GameTextForPlayer(playerid,"~w~ON DRUGS",5000,3);

	if (IsSuspectInRangeOfPolice(playerid) && PlayerInfo[playerid][pJailed] == 0)
	{
	format(string, sizeof(string), "Crime: Drug Consumption");
	ReportCrimeTOPolice(playerid,string);
	PlayerInfo[playerid][pWantedLevel] ++;
	}
	SetPlayerWantedStats(playerid,"Drug Consumption");

	}else{
	SendClientMessage(playerid, COLOR_ERROR, "Law Enforcement Agents Cannot Take Drugs.");
	}

	}else{
	SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
	}

	return 1;
}
PSYCHOBABYKILLA 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
Special action bug summary beckzy Bug Reports 3 18/10/2014 05:53 AM
Special Action. JaKe Elite Scripting Help 6 20/12/2012 10:11 AM
0.3e bug ( Special Action ) scott1 Bug Reports 4 10/05/2012 07:21 PM
[Help] About Player Special Action [Help] mouradde48 Help Archive 2 23/12/2010 08:25 PM
Special action.. lakierka Help Archive 7 16/10/2009 10:06 AM


All times are GMT. The time now is 10:20 AM.


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