?? Do something to others command ??
#1

Hi i was just wondering how do i make a command like:

/givemp5 [ID]

Like a command where you could asign a playerid to and it'll do the command to the player?

Thanks!
Reply
#2

You will need ZCMD and sscanf. There are TONS of tutorials to do this.

A simple command example
pawn Код:
CMD:givemp5(playerid,params[])//givemp5 is your command name
{
    new targetid;//The id to which you want to give weapon
    if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"Usage : /givemp5 [ID]");//if he typed wrong
    GivePlayerWeapon(targetid,WEAPON_MP5,1000);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)