Max_Players
#1

Hi, The last time i scripted a server it was probably around 1-2 years ago, So i have noticed that samp has changed a bit and i am trying to make it so when you teleport you show up in the same place after you die, heres what i have.


new tga[MAX_PLAYERS];

And under OnPlayerSpawn

if (tga[playerid] == 1)
{
GivePlayerWeapon(playerid,22,60);
GivePlayerWeapon(playerid,29,200);
SendClientMessage(playerid,yellow,"--------[Hitman Battlegrounds]--------");
SendClientMessage(playerid,white,"|| Checkout /help ||");
SendClientMessage(playerid,yellow,"--------------------------------------");
SetPlayerHealth(playerid,9);
SetPlayerPos(playerid,1408.7151,-1475.3160,125.3672);
}
else
{
SetPlayerHealth(playerid,150);
ResetPlayerWeapons(playerid);
}
return 1;
}


Then heres when you teleport.

if (strcmp("/TGrounds", cmdtext, true, 10) == 0)
{
tga[playerid] = 1;
GivePlayerWeapon(playerid,22,60);
GivePlayerWeapon(playerid,29,200);
SendClientMessage(playerid,yellow,"--------[Hitman Battlegrounds]--------");
SendClientMessage(playerid,white,"|| Checkout /help ||");
SendClientMessage(playerid,yellow,"--------------------------------------");
SetPlayerHealth(playerid,9);
SetPlayerPos(playerid,1408.7151,-1475.3160,125.3672);
return 1;
}


Then when i compile i get.

C:\Users\Sleek\Desktop\GTASanAndreas\gamemodes\hmb g.pwn(32) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Sleek\Desktop\GTASanAndreas\gamemodes\hmb g.pwn(32) : error 009: invalid array size (negative, zero or out of bounds)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


WTF?
Reply


Messages In This Thread
Max_Players - by Sleek420 - 21.11.2011, 00:16
Re: Max_Players - by Calgon - 21.11.2011, 00:20
Re: Max_Players - by antonio112 - 21.11.2011, 00:20
Re: Max_Players - by =WoR=G4M3Ov3r - 21.11.2011, 00:23
Re: Max_Players - by Sinc - 21.11.2011, 00:24
Re: Max_Players - by Sleek420 - 21.11.2011, 00:35

Forum Jump:


Users browsing this thread: 1 Guest(s)