[HELP] Pickup went wrong i guess`?
#1

Hello, can anyone please help me fix this pickup cause i really need to make it work thank you.


Script:
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
new mypickup;
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	mypickup = CreatePickup(1274, 2, 2291.7900, -1438.1653, 21.3438, -1);
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	return 1;
}

public OnGameModeExit()
{
 return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(playerid == mypickup)
    {
    SendClientMessage(playerid,0xFFFFFFFF,"You are nice!");
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Errors:
Код:
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(160) : warning 217: loose indentation
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(160) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(160) : error 004: function "OnVehicleMod" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(165) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(165) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(165) : error 004: function "OnVehiclePaintjob" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(170) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(170) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(170) : error 004: function "OnVehicleRespray" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(175) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(175) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(175) : error 004: function "OnPlayerSelectedMenuRow" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(180) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(180) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(180) : error 004: function "OnPlayerExitedMenu" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(185) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(185) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(185) : error 004: function "OnPlayerInteriorChange" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(190) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(190) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(190) : error 004: function "OnPlayerKeyStateChange" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(195) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(195) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(195) : error 004: function "OnRconLoginAttempt" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(200) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(200) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(200) : error 004: function "OnPlayerUpdate" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(205) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(205) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(205) : error 004: function "OnPlayerStreamIn" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(210) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(210) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(210) : error 004: function "OnPlayerStreamOut" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(215) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(215) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(215) : error 004: function "OnVehicleStreamIn" is not implemented
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(220) : warning 225: unreachable code
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(220) : error 029: invalid expression, assumed zero
C:\Users\Olabvii\Desktop\samp03bsvr_R2_win32\filterscripts\pu.pwn(220) : error 004: function "OnVehicleStreamOut" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

1: You are creating the pickup in OnFilterScriptInit, but its not a filterscript
2: There's a missing closing bracket '}' in OnPlayerPickupPickup
3: please use [ pawn] tags when pasting pawn code
Reply
#3

EDIT: Nevermind, didn't see the comment.
Reply
#4

well #define FILTERSCRIPT is commented, and if he uses it as a gamemode it will fail, anyways, I recommend you uncomment #define FILTERSCRIPT (remove the // at the beggining of the line) and fix the missing '}' bracket
Reply
#5

if(playerid == mypickup) = wrong!
if(pickupid == mypickup) = right!
:P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)