30.08.2011, 00:48
(
Последний раз редактировалось ModianO; 07.09.2011 в 12:43.
)
Creating simple /tp and /kill commands.
Many newbies scripters want to start making a stunt server for example. They will need some basics commands. Im here to help them. Im ModianO, a regular scripter by my opinion and i will help you creating /tp and /kill command.
What can /tp and /kill commands can help you with:
Those two commands[/tp /kill] plays big roles in stunt servers usually. You can use /kill if you are stuck and use /tp t go to another stunt place, spawn location and more places that you can script.
What /tp and /kill are not useful for:
If you have an DM/RP server /tp and /kill is not needed. Reason is, when you are in DM and you are about to kill someone he does /tp or /kill in order to dont give you a better score. In RP servers /tp cmd and /kill are only useful if you are admin. Since /tp and /kill are non-rp cmds.
1. Open SA:MP and enter in a server.
2. Go to a position that you want to teleport and do /save tp-place.[tp-place is a comment]
3. Open Documents--->Gta sa user files----> SAMP---->saved positions.txt.
4. Copy[CTRL+C]the position you saved.[the format is AddPlayerClass(playerid, skinid,FLOATX,FLOATY,FLOATZ,facingangle); You will copy the floatx,y,z);
5. Open your server's folder then click to the folder "pawno" and open pawno.exe.
6. Press CTRL+F and search for public OnPlayerCommandText(playerid, cmdtext[]).
7. Copy paste this one:
Note: I don't want to prove anyone "noob" or "professional" scripter. I earn all the information needed about scripting and sharing it with others.
If you think this tutorial was not helpful let me know in comments.
Many newbies scripters want to start making a stunt server for example. They will need some basics commands. Im here to help them. Im ModianO, a regular scripter by my opinion and i will help you creating /tp and /kill command.
What can /tp and /kill commands can help you with:
Those two commands[/tp /kill] plays big roles in stunt servers usually. You can use /kill if you are stuck and use /tp t go to another stunt place, spawn location and more places that you can script.
What /tp and /kill are not useful for:
If you have an DM/RP server /tp and /kill is not needed. Reason is, when you are in DM and you are about to kill someone he does /tp or /kill in order to dont give you a better score. In RP servers /tp cmd and /kill are only useful if you are admin. Since /tp and /kill are non-rp cmds.
1. Open SA:MP and enter in a server.
2. Go to a position that you want to teleport and do /save tp-place.[tp-place is a comment]
3. Open Documents--->Gta sa user files----> SAMP---->saved positions.txt.
4. Copy[CTRL+C]the position you saved.[the format is AddPlayerClass(playerid, skinid,FLOATX,FLOATY,FLOATZ,facingangle); You will copy the floatx,y,z);
5. Open your server's folder then click to the folder "pawno" and open pawno.exe.
6. Press CTRL+F and search for public OnPlayerCommandText(playerid, cmdtext[]).
7. Copy paste this one:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd,"/tp", true) == 0)
{
SetPlayerPos(playerid, FLOATX,FLOATY,FLOATZ);
return 1;
}
if(strcmp(cmd,"/kill",true) == 0)
{
SetPlayerHealth(playerid, 0);
return 1;
}
return 0;
}
If you think this tutorial was not helpful let me know in comments.