[SOLVED]
#1

Код:
public OnPlayerSpawn(playerid)
{
  S_OnPlayerSpawn(playerid);
  SetPlayerArmour(playerid,100);
  SetPlayerTeamColor(playerid);
	spawn(playerid);
	SendClientMessage(playerid,COLOR_RED,"You have entered the EXTREME WAR !");
	return 1;
}
spawn(playerid, classid)
{
  if (classid == 0)
  {
  GivePlayerWeapon(playerid,31,500);
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,22,500);
  }
	else if (classid == 1)
  {
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,22,500);
  }
  else if (classid == 2)
  {
	GivePlayerWeapon(playerid,35,50);
  GivePlayerWeapon(playerid,22,500);
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,4,500);
  }
  else if (classid == 3)
  {
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,34,250);
  GivePlayerWeapon(playerid,4,50);
	}
  else if (classid == 4)
  {
  GivePlayerWeapon(playerid,31,500);
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,22,500);
  }
  else if (classid == 5)
  {
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,22,500);
  }
  else if (classid == 6)
  {
	GivePlayerWeapon(playerid,35,50);
  GivePlayerWeapon(playerid,22,500);
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,4,500);
  }
  else if (classid == 7)
  {
  GivePlayerWeapon(playerid,32,500);
  GivePlayerWeapon(playerid,34,250);
  GivePlayerWeapon(playerid,4,50);
  }
	return 1;
}
It gives weapons from classid 0 to everyone.
Reply
#2

I see you have two params at function spawn (playerid & classid), but you're only using the playerid param:
Quote:
Originally Posted by MaykoX™
Код:
spawn(playerid);
Reply
#3

aahh i just wanted to post the same >.<
Reply
#4

Quote:
Originally Posted by Don Correlli
I see you have two params at function spawn (playerid & classid), but you're only using the playerid param:
Quote:
Originally Posted by MaykoX™
Код:
spawn(playerid);
I tried to make spawn(playerid,classid) but than i get some wierd errors. ( I changed onplayerspawn... [added ,classid] than i get error that something is diffrent than prototype. Can someone tell me how to do it ? XD
Reply
#5

then change this:
Код:
forward spawn(playerid);
to
Код:
forward spawn(playerid, classid);
Reply
#6

spawn(classid);
Reply
#7

Quote:
Originally Posted by Notime
then change this:
Код:
forward spawn(playerid);
to
Код:
forward spawn(playerid, classid);
Thanks.

EDIT: It works thanks.
Reply
#8

your welcome
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)