SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 13/09/2009, 08:50 PM   #1
legendario
Big Clucker
 
Join Date: Jun 2009
Posts: 150
Reputation: 0
Default Simple Teleport Command [For Beginners]

Hey All!
Here i Will Show You How To Make A Simple Teleport Command!

First Of All: You Will Need Some Experience On "SetPlayerPos"

This Will Go On "OnPlayerCommandText"
pawn Code:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, //PUT HERE THE PLAYER POSITION);
        SendClientMessage (playerid, //COLOR , "//MESSAGE");
        return 1;
    }


    }
    return 0;
}

Adding More Things To It
Example, Sending Money "GivePlayerMoney(playerid,
//AMMOUNT)"

pawn Code:
if (strcmp("/grove", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 2475.6655,-1662.9609,13.3326);
        SendClientMessage(playerid, COLOR_RED , "Hey");
         GivePlayerMoney(playerid,500);
        return 1;
    }


    }
    return 0;
}

Adding Some Guns
Get Guns Id From
http://wiki.sa-mp.com/wiki/Weapons "GivePlayerWeapon(playerid, 31, 9999);"

pawn Code:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 2475.6655,-1662.9609,13.3326);
        SendClientMessage(playerid, COLOR_RED , "Hey");
         GivePlayerWeapon(playerid, 31, 9999); //31 IS THE M4, 9999 IS AMMO
        return 1;
    }


    }
    return 0;
}

Setting Player Health And Armour "SetPlayerHealth(playerid, 100)" "SetPlayerArmour(playerid, 100);"

pawn Code:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, //PLAYER POSITION);
        SendClientMessage(playerid, //COLOR , "//MESSAGE");
         SetPlayerHealth(playerid, 100); //100 IS THE PLAYER HEALTH CHANGE IT IF U WANT
        SetPlayerArmour(playerid, 100); //100 IS THE PLAYER ARMOUR CHANGE IT IF U WANT
       
        return 1;
    }


    }
    return 0;
}

Full Teleport Command

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/shoot", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 1457.7526,-1062.9589,213.3828);
        SendClientMessage(playerid, COLOR_RED , "Ready To Shoot!");
        GivePlayerWeapon(playerid, 31, 9999);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 100);
        return 1;
    }

    }
    return 0;
}

Please Reply If It Was HelpFul!
legendario is offline  
Old 14/09/2009, 02:53 AM   #2
Doppeyy
Gangsta
 
Doppeyy's Avatar
 
Join Date: May 2009
Posts: 947
Reputation: 0
Default Re: Simple Teleport Command

Well i think people knew how to make a teleport.
But the tutorial is a good one never the less.
Good work, now try making a tut for a more complex thing.

/Artix
__________________
Doppeyy is offline  
Old 14/09/2009, 02:53 PM   #3
Peter_Corneile
Gangsta
 
Join Date: Mar 2009
Posts: 880
Reputation: 0
Default Re: Simple Teleport Command

Quote:
Originally Posted by [RiFA
Artix ]
Well i think people knew how to make a teleport.
But the tutorial is a good one never the less.
Good work, now try making a tut for a more complex thing.

/Artix
I agree that people know how to make a Simple Teleport command but still there are many who done even know 'P' of pawno ... No Offence... So this tutorial may be really helpful to them
Peter_Corneile is offline  
Old 14/09/2009, 03:23 PM   #4
Clavius
Big Clucker
 
Join Date: Feb 2008
Posts: 157
Reputation: 0
Default Re: Simple Teleport Command

Quote:
Originally Posted by ►►►Peter Corneile◄◄◄
Quote:
Originally Posted by [RiFA
Artix ]
Well i think people knew how to make a teleport.
But the tutorial is a good one never the less.
Good work, now try making a tut for a more complex thing.

/Artix
I agree that people know how to make a Simple Teleport command but still there are many who done even know 'P' of pawno ... No Offence... So this tutorial may be really helpful to them
Those should really need to learn the basics, not read tutorials like this.

To comment on the tutorial, at least give it a correct indentation. If you show someone how to do something, do it correctly.
Clavius is offline  
Old 14/09/2009, 09:30 PM   #5
legendario
Big Clucker
 
Join Date: Jun 2009
Posts: 150
Reputation: 0
Default Re: Simple Teleport Command

i did this because alot of people still don't know how to make tele commands like newbies!
but i will do alot of more things to help people
legendario is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Simple Teleport-Command Generator Streetplaya Filterscripts 17 19/03/2012 02:25 PM
Simple teleport generator javind0 Filterscripts 14 21/09/2010 09:53 PM
[Tool/Web/Other] [APP] Simple Teleport Command Generator Backwardsman97 Filterscripts 18 14/01/2010 06:40 PM
Simple teleport/interior command Jimakos_Static Help Archive 2 09/11/2009 09:41 PM
Simple Help Commands [For Beginners] legendario Help Archive 15 15/09/2009 12:18 AM


All times are GMT. The time now is 04:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.