Help. Teleport SSCANF [URGENT] -
Sam15 - 02.11.2015
Can someone send me the code of /teleport lv/sf/ls.
The code should be made ONLY USING SSCANF AND ZCMD. NOT STRCMP.
If player writes lv then he gets teleported to lv.
Re: Help. Teleport SSCANF [URGENT] -
Sam15 - 02.11.2015
Help me urgent
Re: Help. Teleport SSCANF [URGENT] -
FreAkeD - 02.11.2015
This isn't that hard to make. Simply go in-game, go to the spawn point and type in /save.
Go to your GTA San Andreas user Files in Documents, open SAMP and open up savedpositions.txt and look for the X Y Z code.
Example: AddPlayerClass(0,
-2919.3940, 2055.7629, 8.7861, 269.5200,0,0,0,0,0,0);. What I've put in bold is all you need!
Copy the coordinates and then use
SetPlayerPos to teleport them.
To make commands using
zcmd:
Код:
COMMAND:mycommand(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
// Do something
return 1;
}
More about zcmd can be found out on the thread:
https://sampforum.blast.hk/showthread.php?tid=91354
Re: Help. Teleport SSCANF [URGENT] -
Commands - 02.11.2015
i have the same problem. I understood what Freaked said but my question is how to write in script if player choses lv he'll get teleported to LV. What function shall I use ? Can you give me a part of the code ?
Re: Help. Teleport SSCANF [URGENT] -
J0sh... - 02.11.2015
PHP код:
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
CMD:teleport(playerid, params[]) {
if(isnull(params)) return SendClientMessage(playerid, -1, "/teleport <name>!");
if(!strcmp(params, "LV", true)) {
//Teleport to LV
}
else if(!strcmp(params, "LS", true)) {
//Teleport to LS
}
else SendClientMessage(playerid, -1, "Not a valid teleport name!");
return 1;
}
Not tested.
Re: Help. Teleport SSCANF [URGENT] -
Commands - 02.11.2015
Only SSCANF and ZCMD.
Re: Help. Teleport SSCANF [URGENT] -
J0sh... - 02.11.2015
That is ZCMD, and theres no point of using sscanf.
And sscanf only parses arguments it doesn't check if hello == hello.
Re: Help. Teleport SSCANF [URGENT] -
Commands - 02.11.2015
Using that define is necessary ?
Re: Help. Teleport SSCANF [URGENT] -
J0sh... - 02.11.2015
Well of course unless you don't want the player to be notified of the command arguments.
Re: Help. Teleport SSCANF [URGENT] -
Commands - 02.11.2015
isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
What does that mean ?
And can we use something else instead of this hard, weird letters ?