saved and loaded positions -->please help!
#1

I saw that script here at the forum:
pawn Код:
new pos[MAX_PLAYERS][3];
if(strcmp(cmdtext, "/s", true) == 0)
{
new str[256], playername[256];
SendClientMessage(playerid, GREEN, "Saved your coordinates!");
GetPlayerPos(playerid,pos[playerid][0],pos[playerid][1],pos[playerid][2]);
GetPlayerName(playerid,playername,256);
format(str, 256, "%s saved his coordinates.",playername);
print(str);
return 1;
}
if(strcmp(cmdtext, "/l", true) == 0)
{
new str[256], playername[256];
SendClientMessage(playerid, GREEN, "Loaded your coordinates!");
SetPlayerPos(playerid,pos[playerid][0],pos[playerid][1],pos[playerid][2]);
GetPlayerName(playerid,playername,256);
format(str, 256, "%s loaded his coordinates.",playername);
print(str);
return 1;
}
}
And I want to know how to do that you need touse the command like that:
/s %d
%d = 1-200

And how to save also the angel of the player (a)

And how can I that the positions will save in a file like that:
Poistion 1: X Y Z A

In a file
can someone fix my code?
tanks for helpers
Reply
#2

u need to use strtok n more variables^^
here u find everything u need

https://sampwiki.blast.hk/wiki/Scripting_Basics
https://sampwiki.blast.hk/wiki/Tutorial_of_strtok
https://sampwiki.blast.hk/wiki/Strtok
Reply
#3

I didnt understand anythingcan you just make the code
Reply
#4

Quote:
Originally Posted by nuriel8833
I didnt understand anythingcan you just make the code
If somebody else makes it for you, you'll never learn how to script.
Reply
#5

Quote:
Originally Posted by SpiderPork
Quote:
Originally Posted by nuriel8833
I didnt understand anythingcan you just make the code
If somebody else makes it for you, you'll never learn how to script.
So true....
Reply
#6

So someone can just show me that did he had for the script and explain that and then i will learn
Reply
#7

Ummm 2nd page please help me!!!
Reply
#8

*bump*
cmon again 2nd page please help me!!!
Reply
#9

Stop bumping?
Reply
#10

Quote:
Originally Posted by Don Correlli
Stop bumping?
why
I need help!!!!!!!!!!!!!!!!!1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)