Pages: 1 [2]   Go Down

Author Topic: Some useful Squirrel scripting links  (Read 1963 times)

0 Members and 1 Guest are viewing this topic.

m0niSx

  • Master
  • ***
  • Offline Offline
  • Posts: 614
  • Microsoft Visual C++ Programmer
    • View Profile
    • WWW
Re: Some useful Squirrel scripting links
« Reply #15 on: January 17, 2010, 02:38:19 PM »
Will be functions to read/write INI files or will be converted Dini from Pawn?
I'll create a code to read/write from ini files
Logged
Leaving IV:MP
Thank's guys for all this good time
bye

maybe i'll connect sometimes to see what's new but rerly

Almamu

  • Newbie
  • *
  • Offline Offline
  • Posts: 5
    • View Profile
    • WWW
Re: Some useful Squirrel scripting links
« Reply #16 on: January 17, 2010, 02:39:59 PM »
Will be functions to read/write INI files or will be converted Dini from Pawn?
I'll create a code to read/write from ini files
ok, thanks, i'm learning squirrel syntaxis(i was programing in pawno for SA:MP)
EDIT: I'm having some problems installing it on Eclipse
When i Start a New Project it returns a error: Build Squirrel Error
« Last Edit: January 17, 2010, 02:56:15 PM by Almamu »
Logged
You will need a god, but when that happens there will be none, then there is only one thing, Survive
(c)CopyRight Almamu 2010

Trucker

  • Newbie
  • *
  • Offline Offline
  • Posts: 21
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #17 on: January 20, 2010, 07:53:26 PM »
Short question:
Code: [Select]
    if(cmd[0] == "/waffe")
    {
        if(cmd[1] && cmd[2] && cmd[3])
        {
            if(IsPlayerConnected(cmd[1])){
                AddPlayerWeapon(cmd[1], cmd[2], cmd[3])
SendPlayerMessage(cmd[1], COLOR_RED, "SERVER: ["playerid"]"+GetPlayerName(playerid)+" has sent you a weapon. WeaponID: (" + cmd[2] + "); Ammu: (" + cmd[3] + ")");}
else{
                SendPlayerMessage(playerid, COLOR_RED, "SERVER: No player found!");            }}
    }
Will this work in IV:MP 0.1? :S
Logged

iker29th

  • Newbie
  • *
  • Offline Offline
  • Posts: 7
  • 1337 Playa
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #18 on: January 29, 2010, 01:21:22 PM »
great, I'm glad to see that scripting in IV:MP won't be too different from the SA:MP type, I'll start scripting my own gamemode soon.

it'll probably be a DM/TDM one 8D


Logged
• SA-MP Player Since September '07;
• Windows Live Gamertag: iker29th;
• PWNO Scripter;

[___]Whitetiger

  • Regular
  • **
  • Offline Offline
  • Posts: 254
  • :)
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #19 on: January 30, 2010, 01:07:32 AM »
great, I'm glad to see that scripting in IV:MP won't be too different from the SA:MP type, I'll start scripting my own gamemode soon.

it'll probably be a DM/TDM one 8D

ill be there ;)
Logged
God, is there anything more perfect than GTA:IV...?
All the GTAs before it.

Sebihunter

  • Quality Assurance
  • *****
  • Offline Offline
  • Posts: 290
  • [gerG] since 2006
    • View Profile
    • WWW
Re: Some useful Squirrel scripting links
« Reply #20 on: February 01, 2010, 10:59:25 PM »
for anyone who hasn't noticed: There are some changes in our scripting system.

There are now some more funcs and callbacks. Also funcs and callbacks now begin with a low-case letter and not a high-case one.
Logged


Quote
forum.sa-mp.com
Sorry Sebihunter, you are banned from using this forum!
For calling Kye a liar on a public forum (iv-multiplayer.com).

Trucker

  • Newbie
  • *
  • Offline Offline
  • Posts: 21
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #21 on: February 02, 2010, 06:36:29 PM »
Ah, nice. More functions :)
Is there any reason for the letter-case change?
Logged

Don Correlli

  • Regular
  • **
  • Offline Offline
  • Posts: 112
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #22 on: February 02, 2010, 06:49:02 PM »
Ah, nice. More functions :)
Is there any reason for the letter-case change?

So the functions and callbacks won't look like SA:MP ones probably. MTA is also using low-case letter for functions and callbacks.
Logged

(The SA:MP Balcan community)

JeNkStA

  • Administrator
  • ******
  • Offline Offline
  • Posts: 135
  • Lead Developer
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #23 on: February 02, 2010, 08:44:26 PM »
Ah, nice. More functions :)
Is there any reason for the letter-case change?
Because i don't want it to be too much like sa-mp.
Logged

VRocker

  • Newbie
  • *
  • Offline Offline
  • Posts: 5
    • View Profile
    • WWW
Re: Some useful Squirrel scripting links
« Reply #24 on: February 03, 2010, 01:08:59 AM »
Nice to see you using squirrel :) tis a great language.

Noticed your using the old SetPlayerHealth( playerid, <health> ) though, why not export the classes to squirrel so instead of passing a playerid to the callbacks, pass a pointer then do player.Health = <health>;

Its much nicer, easier and more efficient i've found. It also makes it more unlike samps scripting :)
Logged

JeNkStA

  • Administrator
  • ******
  • Offline Offline
  • Posts: 135
  • Lead Developer
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #25 on: February 03, 2010, 06:02:23 AM »
Nice to see you using squirrel :) tis a great language.

Noticed your using the old SetPlayerHealth( playerid, <health> ) though, why not export the classes to squirrel so instead of passing a playerid to the callbacks, pass a pointer then do player.Health = <health>;

Its much nicer, easier and more efficient i've found. It also makes it more unlike samps scripting :)
Well i havn't really thought about that.
However id much rather have the scripters create thier own classes.
Logged

Paulo_Henrique

  • Newbie
  • *
  • Offline Offline
  • Posts: 17
    • View Profile
Re: Some useful Squirrel scripting links
« Reply #26 on: February 11, 2010, 06:23:52 PM »
Squirrel it´s very easy, it´s like of the syntax of pawn code.
Logged



Pages: 1 [2]   Go Up