Nu te inregistra daca esti idiot sau agramat!
AlphaCS.RO[ORIGINAL GAMING]
Thanks:
0
Likes:
0
-
[Tutorial] How to make a Simple "/Goto" command !
Introduction:
- Hello, today I'm gonna show you today how to make a simple /Goto Command .
- After start, you need to have SSCANF and ZCMD.
Let's start:
- After downloaded and put includes in "pawno/include" folder, we can start scripting. So we need to add that includes, at the top of script:
Code:
#include <a_samp>
#include <zcmd>
#include <sscanf>
- Then, after adding includes, we scroll down, down, and we there we will made /goto command !
Code:
CMD:goto(playerid,params[]) // This it's /Goto command. You can change in your wanted command !
{ // We open brackelet
new ID; // This it's player's ID wich we will teleport !
new Float; // This it's position X position of that player !
new Float:Y; // This it's position Y position of that player !
new Float:Z; // This it's position z position of that player !
new Float:A; // This the Facing Angle position of that player !
if(sscanf(params,"i", ID)) return SendClientMessage(playerid,-1,"{FF0000}AdmUsage: {15FF00}/Goto [PlayerID]"); // He will saw this on screen, if he write just /Goto . Will show to him Correct Usage !
GetPlayerPos(ID, X,Y,Z); // Will get that player Position X,Y,Z !
GetPlayerFacingAngle(ID, A); // Will get that player Facing Angle position !
SetPlayerPos(playerid, X,Y,Z); // Will set the player who type /Goto [ID] to specified player !
SetPlayerFacingAngle(playerid, A); // Will set exactlly that Facing Angle of specified player !
SendClientMessage(playerid, -1, "{FF0000}Cmd: {15FF00}You teleported to specified player !"); // He will saw a message. "You teleported to specified player"
return 1; // Return value !
} // Close brackelet to show we finished command !
All Code:
Code:
#include <a_samp>
#include <zcmd>
#include <sscanf>
CMD:goto(playerid,params[])
{
new ID;
new Float;
new Float:Y;
new Float:Z;
new Float:A;
if(sscanf(params,"i", ID)) return SendClientMessage(playerid,-1,"{FF0000}AdmUsage: {15FF00}/Goto [PlayerID]");
GetPlayerPos(ID, X,Y,Z);
GetPlayerFacingAngle(ID, A);
SetPlayerPos(playerid, X,Y,Z);
SetPlayerFacingAngle(playerid, A);
SendClientMessage(playerid, -1, "{FF0000}Cmd: {15FF00}You teleported to specified player !");
return 1;
}
Similar Threads
-
Replies: 0
Last Post: 21-10-17, 16:47
-
By SergiuOfficial in forum Tutoriale
Replies: 0
Last Post: 24-07-17, 21:23
-
Replies: 0
Last Post: 16-07-17, 11:42
-
By SiNiSTER in forum Tutoriale
Replies: 0
Last Post: 28-03-17, 18:10
-
By KinderBueno. in forum Noutati
Replies: 0
Last Post: 01-02-15, 13:53
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules