SA-MP Forums Archive
Getting started - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Getting started (/showthread.php?tid=295274)



Getting started - androidas - 05.11.2011

I wanna try create tennis fs.The tool (weapon) would be baseball bat.And to bounce ball use the beach ball.So how do i start? Which lines to edit? Need pawn code to get started


Re: Getting started - davve95 - 05.11.2011

Sounds awsome! I have think about this before to Good luck


Re: Getting started - NessaHD - 05.11.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/playtennis", cmdtext, true, 10) == 0)
    {
                //Set the position of the tennis field              
                SetPlayerPos(playerid, positionhere);
                //Gives the player a bb bat
                GivePlayerWeapon(playerid, 5, 1);
               
        return 1;
    }
This is what you have to start with, set the tennis field, give the player a bat, and then you should make the ball movable, and when a players punch it in a special radius, then the ball should move in some directions.. Find out yourself, there are a lot of tutorials about that.

Rep me if i helped.

- cruteX