09.12.2009, 20:38
When i do /safestoremats and the ammount it says "unknown command"to the place and i am heres the command
Please help thanks
Код:
if(strcmp(cmd, "/safestoremats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new family = PlayerInfo[playerid][pFMember];
if(PlayerInfo[playerid][pFMember] == 255)
{
SendClientMessage(playerid,COLOR_GREY,"You are not in a gang !");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid,COLOR_GREY,"You are not in a gang !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /safestoremats [amount]");
format(string, sizeof(string), " You Have %d Materials in your Safe.", FamilyInfo[family][sMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new potdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /safestoremats [amount]");
format(string, sizeof(string), " You Have %d Materials in your Safe.", FamilyInfo[family][sMats]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (potdeposit > PlayerInfo[playerid][pMats] || potdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
return 1;
}
if(GangSafe(playerid))
{
PlayerInfo[playerid][pMats] -= potdeposit;
FamilyInfo[family][sMats]=potdeposit+FamilyInfo[family][sMats];
SendClientMessage(playerid, COLOR_WHITE, "|___ SAFE STATMENT ___|");
format(string, sizeof(string), " Deposit: %d Materials",potdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
format(string, sizeof(string), " New Balance: %d Materials", FamilyInfo[family][sMats]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
}
}
}


)