CMD problem
#8

pawn Код:
CMD:saveonfoot(playerid, params[])
{
    if(gPlayerLoggedIn[playerid] == 0) return 1;

    if(KasutajaInfo[playerid][kAdmin] < 3) {
        SendClientMessage(playerid, COLOR_LIGHTRED, "CMD: You are not authorized to use this command, I am sorry.");
        return 1;
    }

    if(!isnull(params)) {
        new string[256];
        new File:onfoot=fopen("onfootpositions.txt", io_append);
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        new Float:A;
        GetPlayerFacingAngle(playerid, A);
        format(string, sizeof(string), "SetPlayerPos(playerid, %f, %f, %f); \r\nSetPlayerFacingAngle(playerid, %f);// %s \r\n\r\n\r\n", X, Y, Z, A, params);
        fwrite(onfoot, string);
        fclose(onfoot);
        SendClientMessage(playerid, COLOR_LIGHTRED, "* You have saved your on foot position.");
        return 1;
    }
    else {SendClientMessage(playerid, COLOR_GREY, "* Must add a comment.");}
   
    return 1;
}
Reply


Messages In This Thread
CMD problem - by kaiks - 23.07.2012, 09:29
Re: CMD problem - by [IKS]Niko_Hs™ - 23.07.2012, 09:59
Re: CMD problem - by kaiks - 23.07.2012, 10:08
Re: CMD problem - by tyler12 - 23.07.2012, 10:16
Re: CMD problem - by kaiks - 23.07.2012, 10:18
Re: CMD problem - by [IKS]Niko_Hs™ - 23.07.2012, 10:20
Re: CMD problem - by vassilis - 23.07.2012, 10:23
Re: CMD problem - by ReneG - 23.07.2012, 10:47

Forum Jump:


Users browsing this thread: 1 Guest(s)