SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 22/02/2012, 07:13 PM   #1
Little Clucker
Jagofr's Avatar
Join Date: Sep 2011
Location: Jamaica
Posts: 34
Reputation: 2
Lightbulb [HELP]/spos command help. Create a /spos command that saves position in a log on the hosting computer

I know SA-MP already has a /save command in the case of it saving the coordinates to the computer you are using but the computer I am hosting my server on is not the computer I use to test the scripts so I want to make a /spos command that saves the locations in a log on the host computer. I've tried using things like
pawn Code:
dcmd_spos(playerid, params[])
    new loc, File:Loc, Float:pos[3], string[60];
    loc = GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    File:Loc = fopen("locations.txt", io_readwrite);
    format(string, 60, "\n\r %s", loc);
    fwrite(File:Loc, string);
    SendClientMessage(playerid, -1, string);
    return 1;
but it doesn't work.. It feeds back some chinese letters or sometimes just " '@&S ".

Can someone tell me what is wrong with this with the command?

NB: 1. Yes I did define dcmd.
2. No. No errors were shown.
3. Yes it did ShowClientMessage but I don't know what happened.

And Second question, Is this the right place to post requests for scripters for my server? If it is what is the format? Just any request?
Jagofr is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any admin script which saves position when player leaves? Gemini Help Archive 1 12/05/2011 09:58 AM
A command like /report that saves in a text file inside scriptfiles Garc1a Help Archive 7 02/11/2010 07:54 PM
how to make command that saves a car into cfg and loades from cfg hardstop Help Archive 2 28/04/2010 07:54 PM
How to make object command what saves objects to somewhere? hardstop Help Archive 0 21/04/2010 12:44 PM
A Position Command? Paradise671 Help Archive 4 02/08/2009 02:47 PM

All times are GMT. The time now is 02:45 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.