other players cant see special action
#1

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
Reply
#2

Where exactly did you put this?
Reply
#3

Please show your code, that way we can help you.
Reply
#4

Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)