[HELP] /war need help
#1

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
Reply
#2

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

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

Look under 'lvdm.pwn', there's random spawns.
Reply
#5

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);
Reply
#6

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.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)