25.08.2012, 07:38
Check
In game
same to givecash..
pawn Код:
dcmd_agivecash(playerid,params[])
{
#pragma unused params
new pname[MAX_PLAYER_NAME];
new id;
new Cash;
new string[128];
if(sscanf(params,"ui",id,Cash))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /agivecash (Player Name/ID) (Amount)");
return 1;
}
GivePlayerMoney(id,Cash);
format(string,sizeof(string),"***An Administrator has given you: %d $.",Cash);
SendClientMessage(id,COLOR_PINK,string);
format(string,sizeof(string),"You have given %s(%d): %d $.",pname,id,Cash);
SendClientMessage(playerid,COLOR_PINK,string);
/*format(string,sizeof(string),"Administrator %s(%d) has given %s(%d): %d $.",PlayerName(playerid),playerid,PlayerName(ID),ID,Cash);
IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);*/
return 1;
}
//------------------------------------------------------------------------------
dcmd_agiveweapon(playerid,params[])
{
#pragma unused params
new pname[MAX_PLAYER_NAME];
new string[128];
new id;
new Ammo;
new Wepid;
if(sscanf(params,"uii",id,Wepid,Ammo))
{
SendClientMessage(playerid,COLOR_ERROR,"Usage: /adgiveweapon (Player Name/ID) (Weapon ID) (Ammo)");
return 1;
}
GivePlayerWeapon(id,Wepid,Ammo);
format(string,sizeof(string),"***An Administrator has given you a weapon. (Weapon: %s.) (Ammo: %d.)",aWeaponNames[Wepid],Ammo);
SendClientMessage(id,COLOR_PINK,string);
format(string,sizeof(string),"***You have given %s(%d) a weapon. (Weapon: %s.) (Ammo: %d.)",pname,id,aWeaponNames[Wepid],Ammo);
SendClientMessage(playerid,COLOR_PINK,string);
/*format(string,sizeof(string),"9[ADMIN WEAPON] Administrator %s(%d) has given %s(%d) a weapon. Weapon: %s. Ammo: %d.",PlayerName(playerid),playerid,PlayerName(ID),ID,aWeaponNames[Wepid],Ammo);
IRC_GroupSay(gGroupAdminID,IRC_ADMINCHANNEL,string);*/
return 1;
}
Код:
You have given(0) a weapon. (Weapon: Colt 45.) (Ammo:500.)