SA-MP Forums Archive
help with command - 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: help with command (/showthread.php?tid=568366)



help with command - Mijata - 21.03.2015

how to add this command only for vip

Код:
new Flaming[MAX_PLAYERS];

CMD:flaminghand(playerid)
{
    if(Flaming[playerid] == 0)
    {
        Flaming[playerid] = 1;
	SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
	SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
	SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
	SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 );
		
	SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Flaming Hand effects is now active.");
    }
    else if(Flaming[playerid] == 1)
    {
        Flaming[playerid] = 0;

        for ( new i = 0; i < 4; i++ )
	if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) )
	RemovePlayerAttachedObject( playerid, i );
        
        SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Flaming Hand effects has been disabled.");

    }
    return 1;
}
define for vips
Код:
	if(pInfo[playerid][Donator] >= 1)



Re: help with command - CalvinC - 21.03.2015

if(pInfo[playerid][Donator] == 0) return


Re: help with command - SickAttack - 21.03.2015

Add this at the top of your command (inside the curly brasses):
pawn Код:
if(pInfo[playerid][Donator] == 0) return SendClientMessage(playerid, -1, "This command is only for vips.");