SA-MP Forums Archive
OnPlayerPickUpPickup doesnt work... - 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: OnPlayerPickUpPickup doesnt work... (/showthread.php?tid=272456)



OnPlayerPickUpPickup doesnt work... - fie - 28.07.2011

Quote:

new helppickup;
new telespickup;

Quote:

helppickup = CreatePickup(1239, 1, 1051.1761,1026.8876,11.0000, -1);
telespickup = CreatePickup(1318, 1, 1024.9261,1043.4180,11.0000, -1);

Quote:

public OnPlayerPickUpPickup(playerid, pickupid)
if(pickupid == helppickup) GameTextForPlayer(playerid, "For help type /help!", 5000, 5);

if(pickupid == telespickup) GameTextForPlayer(playerid, "to tp use /teles", 5000, 5);
}

Where did i go wrong? Compiles with these errors

Quote:

C:\Users\xx\Desktop\wos\gamemodes\wos.pwn(97) : error 010: invalid function or declaration
C:\Users\xx\Desktop\wos\gamemodes\wos.pwn(8 : warning 204: symbol is assigned a value that is never used: "telespickup"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Please help


Re: OnPlayerPickUpPickup doesnt work... - Laronic - 28.07.2011

pawn Код:
//
new helppickup;
new telespickup;
//
helppickup = CreatePickup(1239, 1, 1051.1761,1026.8876,11.0000, -1);
telespickup = CreatePickup(1318, 1, 1024.9261,1043.4180,11.0000, -1);
//
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == helppickup) GameTextForPlayer(playerid, "For help type /help!", 5000, 5);
    else if(pickupid == telespickup) GameTextForPlayer(playerid, "to tp use /teles", 5000, 5);
    return 1;
}



Re: OnPlayerPickUpPickup doesnt work... - fie - 28.07.2011

Thanks