[HELP] First map, getting error
#1

I made my first ever map! I wanted to show you guys and see what you think, but i wanted to test it on sa-mp first. I converted it with a converter but when i try to put the "Createobject" lines into a gamemode (moneygrub, default one that you get) it says

" : error 021: symbol already defined: "CreateObject"

Whats that mean? and how do i fix it?

Thanks guys.
Reply
#2

Hey, I'll help u right away. Just post your script, OK?
Reply
#3

You're probably missing a bracket.
Reply
#4

Quote:
Originally Posted by Don Correlli
You're probably missing a bracket.
This is the script (the very bottem is the stuff i added the "createobject"

http://pastebin.com/f3f53925
Reply
#5

You should add objects to OnGameModeInit() callback, not just anywhere in the script.
Reply
#6

Holy crap 0_o
Please paste this into ur pawno file, sir.
http://pastebin.com/f2facac6b
Reply
#7

Quote:
Originally Posted by TheUllas
Holy crap 0_o
Please paste this into ur pawno file, sir.
http://pastebin.com/f2facac6b
thanks a lot man this helped a lot!...a few questions tho... this is the teleport commands to get to my dm place

Код:
if (strcmp("/anuj", cmdtext, true, 10) == 0) //anuj's dm place
	{
	SetPlayerPos(playerid, 2855.518,1831.024,11.323);
  	SetPlayerInterior(playerid, 0);
	return 1;
	}
it works and everything but...how do i make it that as soon as you get to my place, you get a certain weapons? and when you leave the weapons are gone too?

Also, i have a few barrels that blow up when you shoot them....they didnt appear back after i came back after awhile...why is that?

and how did you fix my error? what was wrong with it?
Reply
#8

Quote:
Originally Posted by killdahobo99
Quote:
Originally Posted by TheUllas
Holy crap 0_o
Please paste this into ur pawno file, sir.
http://pastebin.com/f2facac6b
thanks a lot man this helped a lot!...a few questions tho... this is the teleport commands to get to my dm place

Код:
if (strcmp("/anuj", cmdtext, true, 10) == 0) //anuj's dm place
	{
	SetPlayerPos(playerid, 2855.518,1831.024,11.323);
    giveplayerweapon(26,1000) //the 26 is the weapon and 1000 the ammo
  	SetPlayerInterior(playerid, 0);
	return 1;
	}
Reply
#9

Quote:
Originally Posted by BiG_Sm0k3
if (strcmp("/anuj", cmdtext, true, 10) == 0) //anuj's dm place
{
SetPlayerPos(playerid, 2855.518,1831.024,11.323);
giveplayerweapon(26,1000) //the 26 is the weapon and 1000 the ammo
SetPlayerInterior(playerid, 0);
return 1;
}
That will give an error. You need to use it like GivePlayerWeapon.
Reply
#10

You can do it like this...
Pawno
Код:
if (strcmp("/anuj", cmdtext, true, 10) == 0) //anuj's dm place
	{
	SetPlayerPos(playerid, 2855.518,1831.024,11.323);
     GivePlayerPeapon(26,1000) //the 26 is the Shotgun and 1000 the ammo

     CreateObject(1225, 2858.518,1831.024,11.323, 0.00, 0.00, 0.00);
     CreateObject(1225, 2853.518,1831.024,11.323, 0.00, 0.00, 0.00);

  	SetPlayerInterior(playerid, 0);
	return 1;
	}
That means: If you use this command, two explosive barrels appear somewhere next to you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)