SA-MP Forums Archive
How to do it[+REP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to do it[+REP] (/showthread.php?tid=584085)



How to do it[+REP] - [SU]Spartan - 02.08.2015

Hello guys,
So i got this code
Код:
	if(strcmp(cmd, "/vhealme", true) == 0)
	{
	if(AccInfo[playerid][pVip] >= 1)
	{
	SetPlayerHealth(playerid, 100);
	SendClientMessage(playerid, -1, ""COL_RED"[INFO]:"COL_LIME" You have been healed!");
	}
	else SendClientMessage(playerid, -1, ""COL_RED"[ERROR]:"COL_LIME" You aren't a V.I.P member!");
	return 1;
	}
I want to get player's wanted level and if he is wanted I dont want this action to happen.Help me and u'll get repped


Re: How to do it[+REP] - AIped - 02.08.2015

pawn Код:
if(GetPlayerWantedLevel(playerid) >0)return 0;



Re: How to do it[+REP] - Roberto80 - 02.08.2015

Код:
if(strcmp(cmd, "/vhealme", true) == 0)
	{
	if(AccInfo[playerid][pVip] >= 1)
	{
         if(GetPlayerWanterLevel(playerid) != 0) return SendClientMessage(playerid,-1,""COL_RED"[ERROR]:""COL_LIME"You Can't Use This Command While You Are Wanted!!");
	SetPlayerHealth(playerid, 100);
	SendClientMessage(playerid, -1, ""COL_RED"[INFO]:"COL_LIME" You have been healed!");
	}
	else SendClientMessage(playerid, -1, ""COL_RED"[ERROR]:"COL_LIME" You aren't a V.I.P member!");
	return 1;
	}
Use this