[help]I need a little help here not too hard i hope -
lily wayne - 26.07.2009
hello ive been trying to make a pickup that when pickedup it will set your interior to 12 and your position to 2324.33 -1144.79 1050.71 ,,
or atleast this is what i know i should do how ever when i pick it up i show up in the middle of no where and i cant see anything except blue skies(because my interior is set to 12).
can someone help me. this is the code:
Re: [help]I need a little help here not too hard i hope -
James_Alex - 26.07.2009
juste use
pawn Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
if(pickupid == the id)
{
SetPlayerInterior(playerid, 12);
SetPlayerPos(playerid, 2324.33, -1144.79, 1050.71);
return 1;
}
}
Re: [help]I need a little help here not too hard i hope -
lily wayne - 26.07.2009
it still didnt work only this time after i enter i start falling down towards the street here is my old code:
PAWN CODE:
#include <a_samp>
#include <a_objects>
#include <a_players>
#include <a_vehicles>
#include <steam>
#define red 0xFF0000AA
#define COLOR_GREEN 0x33AA33AA
#define green 0x33FF33AA
#define yellow 0xFFFF00AA
#define grey 0xC0C0C0AA
#define blue1 0x2641FEAA
#define lightblue 0x33CCFFAA
#define orange 0xFF9900AA
#define black 0x2C2727AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN1 0x33AA33AA
#define COLOR_BROWN 0xA52A2AA
new hpickup;
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" my home entering");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
hpickup = AddStaticPickup(1559,23,300.2350,-1154.4816,81.3786);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotohome", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid))
SetPlayerPos(playerid,290.2350,-1154.4816,81.3786);
SetPlayerFacingAngle(playerid,42.837
;
GameTextForPlayer(playerid,"~y~ Welcome home",3000,3);
}else{
SendClientMessage(playerid,red,"You are not Admin");
}
return 0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == hpickup)
SetPlayerPos(playerid, 2324.33,-1144.79,1050.71);
SetPlayerInterior(playerid,12);
GameTextForPlayer(playerid,"~w~ Welcome To ~n~ ~g~ Thundz ~h~ Home",1,0);
return 1;
}
Re: [help]I need a little help here not too hard i hope -
James_Alex - 26.07.2009
Quote:
Originally Posted by lily wayne
it still didnt work only this time after i enter i start falling down towards the street here is my old code:
PAWN CODE:
#include <a_samp>
#include <a_objects>
#include <a_players>
#include <a_vehicles>
#include <steam>
#define red 0xFF0000AA
#define COLOR_GREEN 0x33AA33AA
#define green 0x33FF33AA
#define yellow 0xFFFF00AA
#define grey 0xC0C0C0AA
#define blue1 0x2641FEAA
#define lightblue 0x33CCFFAA
#define orange 0xFF9900AA
#define black 0x2C2727AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN1 0x33AA33AA
#define COLOR_BROWN 0xA52A2AA
new hpickup;
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" my home entering");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
hpickup = AddStaticPickup(1559,23,300.2350,-1154.4816,81.3786);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotohome", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid))
SetPlayerPos(playerid,290.2350,-1154.4816,81.3786);
SetPlayerFacingAngle(playerid,42.837 ;
GameTextForPlayer(playerid,"~y~ Welcome home",3000,3);
}else{
SendClientMessage(playerid,red,"You are not Admin");
}
return 0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if( pickupid == hpickup)
SetPlayerPos(playerid, 2324.33,-1144.79,1050.71);
SetPlayerInterior(playerid,12);
GameTextForPlayer(playerid,"~w~ Welcome To ~n~ ~g~ Thundz ~h~ Home",1,0);
return 1;
}
|
you got errors or warnings ?
Re: [help]I need a little help here not too hard i hope -
lily wayne - 26.07.2009
i got one warning:
C:\Users\USER\Desktop\server\filterscripts\hint.pw n(86) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: [help]I need a little help here not too hard i hope -
lily wayne - 26.07.2009
i forgot to say that line 86 is the SetplayerInterior line so that might be the problem
Re: [help]I need a little help here not too hard i hope -
GTA_Rules - 26.07.2009
Fix your intendation and it will be fixed
Re: [help]I need a little help here not too hard i hope -
lily wayne - 26.07.2009
what do u mean by intendation
Re: [help]I need a little help here not too hard i hope -
James_Alex - 26.07.2009
try this
pawn Код:
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == hpickup)
{
SetPlayerPos(playerid, 2324.33,-1144.79,1050.71);
SetPlayerInterior(playerid,12);
GameTextForPlayer(playerid,"~w~ Welcome To ~n~ ~g~ Thundz ~h~ Home",1,0);
return 1;
}
return 1;
}
Re: [help]I need a little help here not too hard i hope -
lily wayne - 26.07.2009
never mind now it gives me 2 warning ill just use some guys script that makes homes:
--==QUOTE==--
1 house = 1 line