SA-MP Forums Archive
Little 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: Little help (/showthread.php?tid=139883)



Little help - [SsC11]MAVERIK - 06.04.2010

Код:
if(IsPlayerInVehicle(playerid, 520) || i == callingplayer)
D:\Server SA-MP\peppe\gamemodes\ifgm.pwn(4387) : error 033: array must be indexed (variable "callingplayer")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Stupid error..


Re: Little help - aircombat - 06.04.2010

try this :
Код:
if(IsPlayerInVehicle(playerid, 520) || i == callingplayer(playerid))
or this :
Код:
if(IsPlayerInVehicle(playerid, 520) || i == callingplayer[playerid])



Re: Little help - [SsC11]MAVERIK - 06.04.2010

Quote:

this :
Код:
if(IsPlayerInVehicle(playerid, 520) || i == callingplayer[playerid])
No error.. Testing


Re: Little help - [SsC11]MAVERIK - 06.04.2010

Edit: It doesn't work..


Re: Little help - [SsC11]MAVERIK - 06.04.2010

Soz for the triple post

Quote:
Originally Posted by [IF
MavericK ]
Edit: It doesn't work..
I'm doing this:
Код:
forward ChiamaTG(playerid);
Код:
if(strcmp(cmdtext, "/ctg", true) == 0)
{
	new callingplayer[MAX_PLAYER_NAME];
	GetPlayerName(playerid, callingplayer, sizeof(callingplayer));
	format(string, sizeof(string), " Mayday! Mayday! Qui %s, richiedo supporto aereo!", callingplayer);
	SendClientMessageToAll(0xFFFF00AA, string);
	ChiamaTG(playerid);
	
 	return 1;
}
Код:
public ChiamaTG(playerid)
{
	new callingplayer[MAX_PLAYER_NAME];
	GetPlayerName(playerid, callingplayer, sizeof(callingplayer));

	new string[128];
	format(string, sizeof(string), "Mayday, Mayday. Qui %s richiedo supporto aereo!", callingplayer);

	new name[MAX_PLAYER_NAME];

	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			GetPlayerName(i, name, sizeof(name));
			if(strfind(name, "[TG]", true) != -1)
			{
				GameTextForPlayer(i, string, 3000, 3);
				if(IsPlayerInVehicle(i, 520) || i == callingplayer[playerid])
				{
				} else
				{
				SetPlayerPos(i, 298.8918,1806.5530,17.6406);
				}
				
			}
		}
	}
	return 1;
}



Re: Little help - silvioct - 07.04.2010

nn so come aiutarti