Two commands help - 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: Two commands help (
/showthread.php?tid=594015)
Two commands help -
UnforgiveNNN - 12.11.2015
Hello.
I want to ask you few questions. I hope you can help me.
How can i do an admin duty command? I mean like: When an admin typing /duty he will get his skin changed to woozie, minigun and a mini-slap to avoid begin stuck on skin change ( on critical times when you need do fast /duty ). Also god mode if possible, but i think not.
How to make an /rape command?
Thank you and i hope you can help me. I will give reputation for every answer that will help me fix this out.
Re: Two commands help -
MeCom - 12.11.2015
admin duty
Код:
new aDuty[MAX_PLAYERS];
new pOldSkin[MAX_PLAYERS];
CMD:duty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >=1)
{
pOldSkin[playeris] = GetPlayerSkin(playerid);
if (aDuty[playerid] == 0)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+3);
SetSkin(playerid, 294);
SetPlayerHealth(playerid,999999);
GivePlayerWeapon(playerid, 38, 999999);
aDuty[playerid] = 1;
}
else if (aDuty[playerid] == 1)
{
SetPlayerSkin(playerid, pOldSkin);
SetPlayerHealth(playerid,100);
ResetPlayerWeapons(playerid);
aDuty[playerid] = 0;
}
}
return 1;
}