Saving to .txt file
#2

Why the hell do you use strtok? O_O

pawn Код:
dcmd_cp(playerid,params[])
{
    if(IsPlayerAdmin(playerid)) {
        new cpName;
        new Float:X,Float:Y,Float:Z,string[128];
        GetPlayerPos(playerid,X,Y,Z);
        if(strlen(params)) {
            strmid(cpName, params, 0, 255);
            CreateDynamicCP(X,Y,Z,3,-1,-1,-1,100.0);
            format(string,sizeof(string),"%s = CreateDynamicCP(%0.1f,%0.1f,%0.1f,3,-1,-1,-1,100.0);",cpName,X,Y,Z);
            SaveToFile("CheckPoints",string);
        } else return SendClientMessage(playerid,red,"USAGE: /CP [CP Name]");
    } else return SendERROR(playerid,1);
    return 1;
}
Reply


Messages In This Thread
Saving to .txt file - by willsuckformoney - 24.10.2010, 13:59
Re: Saving to .txt file - by LarzI - 24.10.2010, 14:06
Re: Saving to .txt file - by willsuckformoney - 29.10.2010, 12:09
Re: Saving to .txt file - by HydraX - 14.11.2010, 13:51

Forum Jump:


Users browsing this thread: 4 Guest(s)