24.06.2011, 18:47
Well, im making a /makeleader command, this is what it turned out to be right now:
The error i get is:
Sorry if its obvious why its not working, or if there is something majorly wrong, its just that im new to scripting.
Thanks for any help,
/DaRealz\
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
{
if(PlayerInfo[playerid][AdminLevel] = 1337)
{
if(factionid <= 14)
{
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);
}
else if(factionid >= 14)
{
SendClientMessage(playerid, COLOR_GREEN, "The Factionid needs to be between 14 and 0 !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "You are not authorized to use this command !");
}
}
return 1;
}
Код:
C:\Users\Administrator\Desktop\samp03csvr_R2-2_win32 (10)\gamemodes\KTS.pwn(394) : warning 211: possibly unintended assignment Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warnings.
Thanks for any help,
/DaRealz\