Simple Question
#3

I tested this and it works:
pawn Код:
dcmd_makeleader(playerid, params[])
{
    new
        giveplayerid,
        factionid,
        string[128];
    if (sscanf(params, "ud", giveplayerid, factionid)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /makeleader [playerid/partname] [factionid]");
    else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    else
    {
        PlayerInfo[giveplayerid][pMemberF] = factionid;
        format(string, sizeof(string), "An admin has set your faction to factionid %d.", PlayerInfo[playerid][pMemberF]);
        SendClientMessage(playerid, COLOR_GREEN, string);
    }
    return 1;
}
Also, if you can, i need help with another problem:
Код:
C:\Users\Administrator\Desktop\samp03csvr_R2-2_win32 (10)\gamemodes\KTS.pwn(312) : warning 217: loose indentation
C:\Users\Administrator\Desktop\samp03csvr_R2-2_win32 (10)\gamemodes\KTS.pwn(355) : warning 213: tag mismatch
C:\Users\Administrator\Desktop\samp03csvr_R2-2_win32 (10)\gamemodes\KTS.pwn(355) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
These are the lines the warnings are taking place:
pawn Код:
stock SavePos(playerid){
    new file[128];
    format(file, sizeof(file), "USERS/%s.ini", pName(playerid));
    new Float:xxx,yyy,zzz;
    GetPlayerPos(playerid, xxx, yyy, zzz);
    dini_FloatSet(file, "PositionX", xxx);
    dini_FloatSet(file, "PositionY", yyy);
    dini_FloatSet(file, "PositionZ", zzz);
}
EDIT: also, if possible, is there a way to make instead of it saying my faction is 1 it says LSPD or something?
Reply


Messages In This Thread
Simple Question - by DaRealz - 24.06.2011, 17:11
Re: Simple Question - by Calgon - 24.06.2011, 17:19
Re: Simple Question - by DaRealz - 24.06.2011, 17:55
Re: Simple Question - by DaRealz - 24.06.2011, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)