C:\#SA-MP Server GM\gamemodes\gmsamp.pwn(688) : error 029: invalid expression, assumed zero C:\#SA-MP Server GM\gamemodes\gmsamp.pwn(688) : error 004: function "OnPlayerPickUpPickup" is not implemented C:\#SA-MP Server GM\gamemodes\gmsamp.pwn(690) : error 017: undefined symbol "pickupid" C:\#SA-MP Server GM\gamemodes\gmsamp.pwn(692) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
public OnGameModeInit ()
{
new colete;
colete = CreatePickup(1242, 2, 2613.5334,1824.0939,10.8203, 0);
public OnPlayerPickUpPickup(playerid, 1242)
{
if(pickupid == colete)
{
SetPlayerArmour(playerid, 100);
}
return 1;
}
}
new colete; //Tem que ser global para ir em outras publics e outras coisas. daqui para baixo.
public OnGameModeInit () //Sу pode ter uma dessa
{
colete = CreatePickup(1242, 2, 2613.5334,1824.0939,10.8203, 0); //criando o pickup, o id dele vai estб armazenado dentro da variбvel colete
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)//nгo й para colocar o id do pickup aqui
{
if(pickupid == colete) // o id desse pickup vai ser igual a variбvel colete
{
SetPlayerArmour(playerid, 100); //quando o player entrar no pickup. o colete dele irб ficar 100%
}
return 1;
}
new colete; //var global public OnGameModeInit () { colete = CreatePickup(1242, 2, 2613.5334,1824.0939,10.8203, 0); return 1; } public OnPlayerPickUpPickup(playerid, 1242) { if(pickupid == colete) { SetPlayerArmour(playerid, 100); } return 1; } |
new var_pickup;
public OnGameModeInit() /* OnFilterScriptInit */
{
var_pickup = CreatePickup(function_pickup);
return true;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == var_pickup)
{
/* Funзгo ao player entrar na pickup */
}
return true;
}