Mini gun -
xbox360boy66 - 18.08.2011
could some one make a commands so if i typed /mini id get a minigun. But i want it to be an admin only command.
Re: Mini gun -
Kush - 18.08.2011
Quote:
Originally Posted by xbox360boy66
could some one make a commands so if i typed /mini id get a minigun. But i want it to be an admin only command.
|
YCMD:
PHP код:
YCMD:minigun(playerid, params[], help)
{
#pragma unused params
#pragma unused help
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
ZCMD:
PHP код:
CMD:minigun(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
Re: Mini gun -
ElieJabbour - 18.08.2011
Strcmp or ZCMD ?
Re: Mini gun -
xbox360boy66 - 18.08.2011
Quote:
Originally Posted by ElieJabbour
Strcmp or ZCMD ?
|
ZCMD plz, im gonna try this first
Код:
YCMD:minigun(playerid, params[], help)
{
#pragma unused params
#pragma unused help
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
Re: Mini gun -
xbox360boy66 - 18.08.2011
Quote:
Originally Posted by Kush
YCMD:
PHP код:
YCMD:minigun(playerid, params[], help)
{
#pragma unused params
#pragma unused help
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
ZCMD:
PHP код:
CMD:minigun(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
|
cheers dude
Re: Mini gun -
Kush - 18.08.2011
Quote:
Originally Posted by xbox360boy66
ZCMD plz, im gonna try this first
Код:
YCMD:minigun(playerid, params[], help)
{
#pragma unused params
#pragma unused help
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
|
I have provided both examples. I now use y_commands to write commands, so it's quite easy for me. But I do recommend switching, the different functions and commands which can be used makes things easier. It's also excellent for managing large amount of commands.
Re: Mini gun -
xbox360boy66 - 18.08.2011
G:\Games\Rockstar Games\GTA San Andreas (normal)\gta samp server\filterscripts\mini.pwn(230) : warning 203: symbol is never used: "minigun"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
??
Re: Mini gun -
ElieJabbour - 18.08.2011
Quote:
Originally Posted by xbox360boy66
G:\Games\Rockstar Games\GTA San Andreas (normal)\gta samp server\filterscripts\mini.pwn(230) : warning 203: symbol is never used: "minigun"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
??
|
Define it
Re: Mini gun -
Kush - 18.08.2011
Quote:
Originally Posted by ElieJabbour
Define it
|
Nothing needs defining firstly. Are you sure you haven't altered the code?
Re: Mini gun -
xbox360boy66 - 18.08.2011
Quote:
Originally Posted by Kush
Nothing needs defining firstly. Are you sure you haven't altered the code?
|
hmm yh
Re: Mini gun -
xbox360boy66 - 18.08.2011
G:\Games\Rockstar Games\GTA San Andreas (normal)\gta samp server\filterscripts\mini.pwn(91) : error 017: undefined symbol "minigun"
G:\Games\Rockstar Games\GTA San Andreas (normal)\gta samp server\filterscripts\mini.pwn(97) : warning 225: unreachable code
G:\Games\Rockstar Games\GTA San Andreas (normal)\gta samp server\filterscripts\mini.pwn(91) : warning 203: symbol is never used: "CMD"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Mini gun -
James_Bourne - 18.08.2011
What kind of admin system do u have dcmd? if u got dcmd
try this:
Код:
dcmd_minigun(playerid,params[])
{
#pragma unused params
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
Re: Mini gun -
xbox360boy66 - 18.08.2011
Quote:
Originally Posted by James_Bourne
What kind of admin system do u have dcmd? if u got dcmd
try this:
Код:
dcmd_minigun(playerid,params[])
{
#pragma unused params
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
GivePlayerWeapon(playerid, 38, 9999999);
return 1;
}
|
BTW i am using dcmd
G:\Games\Rockstar Games\GTA San Andreas (normal)\gta samp server\filterscripts\LuxAdmin.pwn(12242) : warning 203: symbol is never used: "dcmd_minigun"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: Mini gun -
James_Bourne - 18.08.2011
ummh u need to go
like like this:
Код:
//Administrator Commands//
if(AdminLevel[playerid] >= 1)
{
dcmd(ahelp,5,cmdtext);
dcmd(warn,4,cmdtext);
dcmd(a,1,cmdtext);
dcmd(slap,4,cmdtext);
}
put in administrator level 1 or 2 or 3 or 4 or 5 or what ever admin level u want
put this code:
Код:
dcmd(minigun,7,cmdtext);
Re: Mini gun -
Kush - 18.08.2011
dcmd is nothing in comparison to the newer command processors. Recommending you (if not again), to switch.
Re: Mini gun -
xbox360boy66 - 18.08.2011
cheers guys, i got it now