Some Scripting Questions
#1

Hello,my name is Gta_Killer and i'm new to scripting.I know these questions aren't for begginers but i would really like if someone can help me:

Question 1:How to install objects?(for example CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0, 0, 96)

Question 2:How to add a GM and ADMIN script to ModernTopia(i mean to have a /gmduty and /adminduty command and a green checkpoint for GM and purple checkpoint for ADMIN)

Question 3:I found the mtrp-final.amx on net but if i try to compile by myself,i get this error:
D:\Games\Rockstar Games\GTA San Andreas\Servers\ModernTopia\gamemodes\mtrp-final.pwn(9845) : error 017: undefined symbol "SetDisabledWeapons"
D:\Games\Rockstar Games\GTA San Andreas\Servers\ModernTopia\gamemodes\mtrp-final.pwn(37874) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")

Thanks for reading my topic and if you can help me i'll be glad !
Reply
#2

A1: Just put them under OnGameModeInit.

A2: If you just inplent the code @ OnPlayerCommandText it should work fine.

A3: Your script is outdated, update it for SAMP 0.3a so remove `SetDisabledWeapons` and the callback `OnPlayerPrivmsg` you'll have to make the pm commands on your own.
Reply
#3

I'm sorry for asking again...at Q1 you sayd i must pun under ongamemodeinit..at me is :

public OnGameModeInit()
{
new string[MAX_PLAYER_NAME];
new string1[MAX_PLAYER_NAME];

Where should i put...under the { or somewhere else?
Reply
#4

Quote:
Originally Posted by Gta_Killer
Where should i put...under the { or somewhere else?
Yes, anywhere under the "{" , like:
Код:
public OnGameModeInit()
{
  new string[MAX_PLAYER_NAME];
  new string1[MAX_PLAYER_NAME];

  CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0, 0, 96);
}
Reply
#5

and again...2 more question :

At Q1 with CreateObject i can add how much obj i want or only 100 for example?

And at Q2 with GM which is the "code"...because im new to scripting and i dont know codes of GM or checkpoints?
Reply
#6

Hello??
Reply
#7

On future: all server limits you can find here
https://sampwiki.blast.hk/wiki/Limits
Q1:You can add more objects, if you will use a Streamer.
--------------------------------------------------------
Q2: Don't know what exacly you need, but i think
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
and
https://sampwiki.blast.hk/wiki/SetPlayerColor
will help you.
Reply
#8

+ Don't bump within 12 hours.
Reply
#9

Are you a scripting beginner?
https://sampwiki.blast.hk/wiki/CreateObject
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)