/equip - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /equip (
/showthread.php?tid=271409)
/equip -
James_Bourne - 24.07.2011
hai how can u do so gangs can have /equip icon and they go there they get weapons
for Raven's Roleplay pleasee
Re: /equip -
Azzeto - 24.07.2011
Hey, hope I didn't respond to late, What CMD system does Ravens Roleplay use? Here is a default command..
pawn Код:
CMD:equip(playerid,params[])
{
GivePlayerWeapon(playerid,(GunID),(Ammo)
GivePlayerWeapon(playerid,(GunID),(Ammo)
}
Theres the basic command with Zcmd, you'll have to edit it to whatever cmd processor ravens roleplay uses.
Re: /equip -
VitalRP - 24.07.2011
Quote:
Originally Posted by Azzeto
Hey, hope I didn't respond to late, What CMD system does Ravens Roleplay use? Here is a default command..
pawn Код:
CMD:equip(playerid,params[]) { GivePlayerWeapon(playerid,(GunID),(Ammo) GivePlayerWeapon(playerid,(GunID),(Ammo) }
Theres the basic command with Zcmd, you'll have to edit it to whatever cmd processor ravens roleplay uses.
|
Bad indentation.
pawn Код:
CMD:equip(playerid, params[]) {
GivePlayerWeapon(playerid,23,100);
GivePlayerWeapon(playerid,31,100);
SendClientMessage(playerid, 0xDEEE20FF, "You have equipped!");
return 1;
}
or strcmp:
pawn Код:
if(strcmp(cmd, "/equip", true) == 0)
{
GivePlayerWeapon(playerid,23,100);
GivePlayerWeapon(playerid,31,100);
SendClientMessage(playerid, 0xDEEE20FF, "You have equipped!");
return 1;
}
Also I assume you want a pickup. So basically add this;
new pickup;
then under public ongamemodeinit() add
pickup = CreatePickup(PickupID, 1, X, Y, Z, VirtualWorld);
Pickupid = id of pickup
1 = Type of pickup
X = X coord
Y = Y coord
Z = Z coord
VirtualWorld = Virtual world (usually 0).
Links:
Pickup IDs
Pickup Types
CreatePickup Help (wiki)
Hope this helped.