Weapons are not working - 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: Weapons are not working (
/showthread.php?tid=115401)
Weapons are not working -
pawelf94 - 23.12.2009
pawn Код:
if(strcmp(cmd, "/dolacz", true) == 0)
{
if(ONWG[playerid] == 0)
{
if(WG40[playerid] == 1)
{
if(P30[playerid] == 1)
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) P29[i] = 1, P30[i] = 0;
}
ONWG[playerid] = 1;
GivePlayerWeapon(playerid, 343, 999);
GivePlayerWeapon(playerid, 348, 999);
GivePlayerWeapon(playerid, 351, 999);
GivePlayerWeapon(playerid, 355, 999);
GivePlayerWeapon(playerid, 353, 999);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
SetPlayerInterior(playerid, 15);
SetPlayerPos(playerid,2190.2075,-1141.6069,1029.7969);
SetPlayerFacingAngle(playerid, 173.8527);
TogglePlayerControllable(playerid, 0);
SetPlayerColor(playerid, COLOR_LIGHTBLUE);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerSkin( playerid, 116 );//groove leader
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerCameraPos(playerid,2202.3303,-1145.6052,1029.7969);
SetPlayerCameraLookAt(playerid,2191.4968,-1138.7035,1029.7969);
}
armor health skin etc are done propelly, but i dont get any weapons :/
Re: Weapons are not working -
Jefff - 23.12.2009
GivePlayerWeapon(playerid, 343, 999);
GivePlayerWeapon(playerid, 348, 999);
GivePlayerWeapon(playerid, 351, 999);
GivePlayerWeapon(playerid, 355, 999);
GivePlayerWeapon(playerid, 353, 999);
Because its pickupid not weaponid
https://sampwiki.blast.hk/wiki/Weapons
on the left is ID 0,1,2,3...
Re: Weapons are not working -
yezizhu - 23.12.2009
Use WEAPON_AK47 etc, instead.
You can find it in a_samp.inc