Little help
#1

Код:
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..
Reply
#2

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

Quote:

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

Edit: It doesn't work..
Reply
#5

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

nn so come aiutarti
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)