CMD:weapons(playerid,params[])
{
foreach(Player, i)
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 38, 1000000);
}
return 1;
}
CMD:giveallweapon(playerid,params[])
{
new weap[32], ammo;
if(sscanf(params, "s[32]i", weap,ammo)) return SCM(playerid,-1, "Use : /Giveallweapon <Weapon ID> <Ammo>");
if(weapid < 1 || weapid > 46) return SCM(playerid, -1, "Invalid weapon ID/Name!");
foreach(Player, i)
{
Giveallweapon(i, weapid, ammo);
}
}
}
|
Something like this?
PHP Code:
|
#include <foreach>
forward changearme(playerid, params[]);
public changearme(playerid, params[])
{
foreach(Player, i)
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 9, 1);
GameTextForPlayer(i, "WwX MOV ~r~[Chainsaw]~n~~w~Mort ou Vif",2000,6);
}
return 1;
}
|
i test, not work,
Code:
#include <foreach> Code:
forward changearme(playerid, params[]);
public changearme(playerid, params[])
{
foreach(Player, i)
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 9, 1);
GameTextForPlayer(i, "WwX MOV ~r~[Chainsaw]~n~~w~Mort ou Vif",2000,6);
}
return 1;
}
|
|
i test, not work,
Code:
#include <foreach> Code:
forward changearme(playerid, params[]);
public changearme(playerid, params[])
{
foreach(Player, i)
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 9, 1);
GameTextForPlayer(i, "WwX MOV ~r~[Chainsaw]~n~~w~Mort ou Vif",2000,6);
}
return 1;
}
|
forward changearme();
public changearme()
{
foreach(Player, i)
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 9, 1);
GameTextForPlayer(i, "WwX MOV ~r~[Chainsaw]~n~~w~Mort ou Vif",2000,6);
}
return 1;
}
thanks +1