SA-MP Forums Archive
[HELP] /war need help - 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: [HELP] /war need help (/showthread.php?tid=100310)



[HELP] /war need help - alistair_hawk - 04.10.2009

Hey all

How can i make that if a player types /war he will be given the weapons? Im a newbie scripter

this is my own code :

Код:
  if(strcmp(cmd, "/war", true) == 0) {
 		SetPlayerPos(playerid, 245.2354, 1891.816,2.581130);
 		GetPlayerSkin(playerid);
 		SetPlayerSkin(playerid, 284);
		SetPlayerHealth(playerid, 100);
 		SetPlayerArmour(playerid, 100);
 		GetPlayerWeaponData(playerid, 356, 2000, 358, 25, 359, 30, 350, 100);
  	  SendClientMessage(playerid, COLOR_RED, "Kill all the people you find!");
  	  return 1;
  	}
But it gives me error/warning

Код:
C:\Documents and Settings\Alistair\Desktop\Server\gamemodes\Hawk.pwn(164) : error 035: argument type mismatch (argument 3)

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Thx for reading post the post

Peace,
Hawk



Re: [HELP] /war need help - Correlli - 04.10.2009

GetPlayerWeaponData is a function to get player's weapons and ammo. Use this: https://sampwiki.blast.hk/wiki/GivePlayerWeapon


Re: [HELP] /war need help - alistair_hawk - 04.10.2009

Thanks so much don you always help me ^^ , how can i make it "random spawn now?"


Re: [HELP] /war need help - Karlip - 04.10.2009

Look under 'lvdm.pwn', there's random spawns.


Re: [HELP] /war need help - alistair_hawk - 04.10.2009

Ok , sry for being annoying , but i have a problem that the player isn't spawning with weapons... this is the code

:

Код:
		GivePlayerWeapon(playerid, 356, 2000);
		GivePlayerWeapon(playerid, 358, 25);
		GivePlayerWeapon(playerid, 350, 100);



Re: [HELP] /war need help - ferriswheel - 04.10.2009

Quote:
Originally Posted by alistair_hawk
GivePlayerWeapon(playerid, 356, 2000);
GivePlayerWeapon(playerid, 358, 25);
GivePlayerWeapon(playerid, 350, 100);
Those aren't valid weapon id's in the second parameter, look here for the id's.


Re: [HELP] /war need help - Correlli - 04.10.2009

Quote:
Originally Posted by alistair_hawk
Ok , sry for being annoying , but i have a problem that the player isn't spawning with weapons... this is the code

:

Код:
		GivePlayerWeapon(playerid, 356, 2000);
		GivePlayerWeapon(playerid, 358, 25);
		GivePlayerWeapon(playerid, 350, 100);
Those are IDs for weapon-pickups, use the link that ferriswheel gave you.