Mini gun
#1

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

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(playeridparams[], help)
{
    
#pragma unused params
    #pragma unused help
    
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"You are not authorized to use that command!");
    
GivePlayerWeapon(playerid389999999);
    return 
1;

ZCMD:
PHP код:
CMD:minigun(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"You are not authorized to use that command!");
    
GivePlayerWeapon(playerid389999999);
    return 
1;

Reply
#3

Strcmp or ZCMD ?
Reply
#4

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; 
}
Reply
#5

Quote:
Originally Posted by Kush
Посмотреть сообщение
YCMD:
PHP код:
YCMD:minigun(playeridparams[], help)
{
    
#pragma unused params
    #pragma unused help
    
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"You are not authorized to use that command!");
    
GivePlayerWeapon(playerid389999999);
    return 
1;

ZCMD:
PHP код:
CMD:minigun(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"You are not authorized to use that command!");
    
GivePlayerWeapon(playerid389999999);
    return 
1;

cheers dude
Reply
#6

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

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.


??
Reply
#8

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

Quote:
Originally Posted by ElieJabbour
Посмотреть сообщение
Define it
Nothing needs defining firstly. Are you sure you haven't altered the code?
Reply
#10

Quote:
Originally Posted by Kush
Посмотреть сообщение
Nothing needs defining firstly. Are you sure you haven't altered the code?
hmm yh
Reply
#11

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.
Reply
#12

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; 
}
Reply
#13

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.
Reply
#14

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);
Reply
#15

dcmd is nothing in comparison to the newer command processors. Recommending you (if not again), to switch.
Reply
#16

cheers guys, i got it now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)