16.02.2014, 15:01
when i type "/seif login" or "/seif depune" or "/seif extrage" or "/seif setpin" server show me "Unknow command", and nothing happens. What's wrong?
?
?Код:
if(strcmp(cmdtext, "/seif", true) == 0)
{
if(IsPlayerConnected(playerid))
{
//new sendername[MAX_PLAYER_NAME];
//GetPlayerName(playerid, sendername, sizeof(sendername));
for(new s=0; s<MAX_PLAYERS; s++)
{
if(PlayerToPoint(0.5, playerid, SeifInfo[s][sEnterX], SeifInfo[s][sEnterY], SeifInfo[s][sEnterZ]))
{
new text[20];
text = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, c_alb, "|____________________________ Seif ____________________________|");
SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Nume Valabile: login, status, extrage, depune, setpin");
SCM(playerid, c_alb, "|______________________________________________________________|");
return 1;
}
else if(strcmp(text, "login", true) == 0)
{
if(SeifLogin[playerid] == 1) return SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}]Esti logat la un seif.");
new pas[50];
pas = strtok(cmdtext, idx);
if(!strlen(pas))
{
SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Foloseste '{F48651}/seif login [parola]");
return 1;
}
if(strcmp(pas, SeifInfo[s][sPass], true) == 0)
{
SeifLogin[playerid] = 1;
format(string, sizeof(string), "{FFFFFF}[{67BDFC}System{FFFFFF}]Te-ai logat la {F48651}seiful %d{FFFFFF} cu {F48651}parola %s{FFFFFF}.", s, pas);
SCM(playerid, c_alb, string);
}
}
else if(strcmp(text, "depune", true) == 0)
{
if(SeifLogin[playerid] == 0) return SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Trebuie sa te loghezi la un seif pentru a putea umbla in el.");
new moneys = strval(tmp);
if(moneys < 0)
{
SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Nu poti depune o suma asa mica.");
return 1;
}
if(moneys > GetPlayerMoney(playerid))
{
SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Ai suficienti bani la tine.");
return 1;
}
else
{
SeifInfo[s][sMoney] += moneys;
GivePlayerMoney(playerid, -moneys);
format(string, sizeof(string), "{FFFFFF}[{67BDFC}System{FFFFFF}] Ai depus in {F48651}seiful %d{FFFFFF}o {F48651}suma de %d${FFFFFF}.", s, moneys);
SCM(playerid, c_alb, string);
format(string, sizeof(string), "{FFFFFF}[{DD0000}CMD{FFFFFF}] {F48651}%s a depus in {F48651}seiful %d{FFFFFF}o {F48651}suma de %d${FFFFFF}.", sendername, s, moneys);
SAM( c_alb, string);
}
}
else if(strcmp(text, "extrage", true) == 0)
{
if(SeifLogin[playerid] == 0) return SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Trebuie sa te loghezi la un seif pentru a putea umbla in el.");
new moneys = strval(tmp);
if(SeifInfo[s][sMoney] < 0)
{
SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] In seif nu exista aceasta suma.");
return 1;
}
if(moneys > SeifInfo[s][sMoney])
{
SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Nu poti extrage atatia bani.");
return 1;
}
else
{
SeifInfo[s][sMoney] -= moneys;
GivePlayerMoney(playerid, moneys);
format(string, sizeof(string), "{FFFFFF}[{67BDFC}System{FFFFFF}] Ai extras din {F48651}seiful %d{FFFFFF}o {F48651}suma de %d${FFFFFF}.", s, moneys);
SCM(playerid, c_alb, string);
format(string, sizeof(string), "{FFFFFF}[{DD0000}CMD{FFFFFF}] {F48651}%s a extras din {F48651}seiful %d{FFFFFF}o {F48651}suma de %d${FFFFFF}.", sendername, s, moneys);
SAM(c_alb, string);
}
}
/*else if(strcmp(text, "status", true) == 0)
{
if(SeifLogin[playerid] == 0) return SCM(playerid, "{FFFFFF}[{67BDFC}System{FFFFFF}] Trebuie sa te loghezi la un seif pentru a putea umbla in el.");
format(string, sizeof(string), "{FFFFFF}[{67BDFC}System{FFFFFF}] In {F48651}seiful %d{FFFFFF}se gaseste o {F48651}suma de %d${FFFFFF}.", s, SeifInfo[s][sMoney});
SCM(playerid, c_alb, string);
}
*/
else if(strcmp(text, "setpin", true) == 0)
{
if(SeifLogin[playerid] == 0) return SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Trebuie sa te loghezi la un seif pentru a putea umbla in el.");
format(string, sizeof(string), "{FFFFFF}[{67BDFC}System{FFFFFF}] Aceasta comanda a fost scoasa momentan pentru {F48651}seiful %d{FFFFFF}.", s);
SCM(playerid, c_alb, string);
}
else SCM(playerid, c_alb, "{FFFFFF}[{67BDFC}System{FFFFFF}] Nu exista aceasta optine.");
}//else return SCM(player, c_alb, "Nu esti langa un seif.");
}
}
return 1;
}


