01.05.2012, 21:37
It's totally wrong. At the moment I am too tired to explain it all, just try this:
Edit: Just tell me if it works. I didn't do this properly, but if it works, I'll change it.
pawn Код:
if(strcmp(cmd, "/set", true) == 0)
{
new string[128], opt[20];
if(PlayerInfo[playerid][pAdmin >= 3)
{
if(sscanf(params, "us[20]i", id, opt, Value))
{
if(strlen(opt) == 0)
{
SendClientMessage(playerid, -1, "SYNTAX: /set [Playerid] [Option] [Value]");
SendClientMessage(playerid, -1, "OPTIONS: Army, Origin, Interior, Skin, ArmyRank, Money, Age");
SendClientMessage(playerid, -1, "OPTIONS: Armor, Cirtual WorldPlayinghours, Score, Experience");
}
else
if(strcmp(opt, "army", true) == 0)
{
format(string, sizeof(string), "You have set %s's Army to %d.", GetName(id), Value);
SendClientMessage(playerid, -1, string);
SavePlayerDat(id);
PlayerInfo[id][pArmy] = Value;
PlayerInfo[id][pArmyRank] = 1;
}
}
}
return 1;
}