Im new (sorry im a noob) can someone help ? thx
#1

So i downloaded samp server i set it up and everything and i want to know how i add stuff to it!
ive seen videos and things but i dont have a clue what there on about!
so can some on teach me how to make 2 code things please
i want something like /v to choose a car and /tele to teleport places like airports and stuff!!
so could someone help me please ?? thanks
Reply
#2

Newcomers to SA-MP should start out by playing SA-MP, not starting a server on SA-MP.

This is not how you learn, and I have seen this behaviour on many newcomers to SA-MP. Starting your own server while knowing nothing about SA-MP gets you nowhere, just play SA-MP for more time till you learn about how servers work.
Reply
#3

Start with this!

Also
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] ) // Callback you are making commands
{
    if( strcmp( "/tele", cmdtext, true, 5 ) == 0 ) // 5 Chars | strcmp compares 2 strings if /tele and the command you wrote is correct then continue..
    { We continue..as the command you wrote is same as /tele and open bracket            
        SetPlayerPos( playerid, X, Y, Z ); // Function that it sets player's pos. Change the X, Y, Z to the coordinates you want to teleport to!
        return 1; // return 1 to stop the command
    } // We finish the command, we returned the value to stop the command and we close the bracket
    return 0; // return 0, else if return 1 it will show "Unknown Command"
}
Reply
#4

So do i just copy and paste them into pawno ??
Reply
#5

Open pawno.exe and click on 'New'. Then press Ctrl + F and write in the search box 'OnPlayerCommandtext'. It will go you to the callback.
Then replace this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}
To
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] ) // Callback you are making commands
{
    if( strcmp( "/tele", cmdtext, true, 5 ) == 0 ) // 5 Chars | strcmp compares 2 strings if /tele and the command you wrote is correct then continue..
    { // We continue..as the command you wrote is same as /tele and open bracket            
        SetPlayerPos( playerid, X, Y, Z ); // Function that it sets player's pos. Change the X, Y, Z to the coordinates you want to teleport to!
        return 1; // return 1 to stop the command
    } // We finish the command, we returned the value to stop the command and we close the bracket
    return 0; // return 0, else if return 1 it will show "Unknown Command"
}

// Remove the text with green color after the '//' if you don't want it.
and hit/press F5 or Compile Button. It will asks you to save it. Save it on
pawn Код:
your_server\gamemodes\name.pwn ( HERE )
If it compiles like that
pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
It's done!
Reply
#6

https://sampwiki.blast.hk/

Use that. Copy-pasting isn't going to get you anywhere.
Reply
#7

I did what you said then i opened up Samp - Server then on samp connected to my server typed in /tele and it just says Server:Unknown command
Reply
#8

After all these, you need to load that Gamemode. Go to your_server folder and open a file called server.cfg
On the line it says
pawn Код:
gamemode0 lvdm 1
Change the name to this you saved. If you saved it with name test.
Replace it with
pawn Код:
gamemode0 test 1
Any help you will need, feel free to ask!
Reply
#9

When i press samp - server it opens then closes? why does it do that ?
Reply
#10

it may be because all the other gamemodes have .pwn and .amx how do i make the .amx?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)