Dont read this post
#5

Quote:
Originally Posted by ThePS3Guy
Here is the piece of script that contains the errors

http://pawno.pastebin.com/d68836762

here are the errors:

Код:
C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(718) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(720) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(722) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
The script is suppost to a: reset the players weapons if he is not in the designated area, this works fine
b: explode their hydra/tank/hunter if they are out of the designated area, this is the part with the errors

PS: at the top under gamemodeinit i have : SetTimer("WeaponsVehicleCheck", 5000, 1); which works
Код:
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
	new Float:X, Float:Y, Float:Z;
	GetPlayerPos(playerid, X, Y, Z);
	if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
	return 0;
}

forward WeaponsVehicleCheck();
public WeaponsVehicleCheck()
{
	for(new i; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(!IsPlayerInArea(i,423.9233, 56.4679, 2138.4824, 1681.4557))
			{
				if(IsPlayerInAnyVehicle(i))
				{
					new CarID = GetPlayerVehicleID(i);
					if(GetVehicleModel(CarID) == 432 || 425 || 520)
					{
						SetVehicleHealth(CarID,0.0);
					}
				}
				ResetPlayerWeapons(i);
			}
		}
	}
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)