Its time to create commands!
First, you want to know the basics. For a simple command you want to know the string functions.
Required String functions for pawn commands are:
1.strcmp
2.strtok
3.strval
4.strlen
5.strcpy
You can know more about these commands by Googling.
A basic Command /health.
first you want to paste this line underneath the #include <a_samp> line
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) 0) && ((((%3)[(%2) + 1] 0) && (dcmd_%1(playerid, ')))||(((%3)[(%2) + 1] 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
all are the same line.
I dont know about this define line but i know its a basic for command creating.
And now Go to the OnPlayerCommandText callback.
type
dcmd(health, 6, cmdtext);
Definition:
Syntax: dcmd(command, number of letters in the command, cmdtext)
command is the text which the player want to type.
cmdtext tells the dcmd function that it is a command.
then come out of the callback.
Now type these(not in any callbacks.)
dcmd_health(playerid, params[])
{
#pragma unused params
GivePlayerMoney(playerid, -100);
SetPlayerHealth(playerid, 100);
}
Now lets see more about this.
#pragma unused params - tells the compiler that the parameters are not used.
GivePlayerMoney(playerid, -100) - gives the player -100 cash.
Remember: Dont use GetPlayermoney because it will get all the cash that the player has!
SetPlayerHealth(playerid, 100) - Sets the player health to the maximun(100 = maximum. 0 = death).
First, you want to know the basics. For a simple command you want to know the string functions.
Required String functions for pawn commands are:
1.strcmp
2.strtok
3.strval
4.strlen
5.strcpy
You can know more about these commands by Googling.
A basic Command /health.
first you want to paste this line underneath the #include <a_samp> line
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) 0) && ((((%3)[(%2) + 1] 0) && (dcmd_%1(playerid, ')))||(((%3)[(%2) + 1] 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
all are the same line.
I dont know about this define line but i know its a basic for command creating.
And now Go to the OnPlayerCommandText callback.
type
dcmd(health, 6, cmdtext);
Definition:
Syntax: dcmd(command, number of letters in the command, cmdtext)
command is the text which the player want to type.
cmdtext tells the dcmd function that it is a command.
then come out of the callback.
Now type these(not in any callbacks.)
dcmd_health(playerid, params[])
{
#pragma unused params
GivePlayerMoney(playerid, -100);
SetPlayerHealth(playerid, 100);
}
Now lets see more about this.
#pragma unused params - tells the compiler that the parameters are not used.
GivePlayerMoney(playerid, -100) - gives the player -100 cash.
Remember: Dont use GetPlayermoney because it will get all the cash that the player has!
SetPlayerHealth(playerid, 100) - Sets the player health to the maximun(100 = maximum. 0 = death).
SA-MP 0.3.7 Client Download
8/10 (17006 votes) - Download GTA San Andreas - Grand Theft Auto Free. GTA San Andreas - Grand Theft Auto for PC is one of the best installments of Rockstar's action saga in which you'll once again become a fearsome gangster. Rockstar and its Grand Theft Auto saga have been delighting enthusiasts. SA-MP is a free Massively Multiplayer Online game mod for the PC version of Rockstar Games Grand Theft Auto: San Andreas (tm). SA-MP 0.3.7 Released:: Posted by SA-MP on 1.
If you just want to play multiplayer, get this!Please note:
- SA-MP requires GTA:SA (DVD game for PC) v1.00 US/EU.
- Version 2.0 of the DVD version can be downgraded to 1.0 using a third-party patch.
- The Steam and Direct2Drive versions of GTA:SA are not currently supported and cannot be downgraded.
- SA-MP 0.3.7-R4 Client Mirror by SA-MP Team
SA-MP Windows Server Download
![San San](https://cs3.gtaall.com/screenshots/4dc09/2013-09/original/77a12c64038c10ecd7bbf09c26e1facad6942bf1/44381-1348831216-gallery1.jpg)
Download Gta San Andreas Samp Multiplayer
Note: This package also includes the scripting tools (PAWN compiler).
Please review the SA-MP Services Agreement if you wish to run a public SA-MP server.
Please review the SA-MP Services Agreement if you wish to run a public SA-MP server.