Unknown Command? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unknown Command? (
/showthread.php?tid=351690)
Unknown Command? -
Nightmare[TR] - 16.06.2012
Hi there,i developed a code ;
pawn Код:
if(strcmp(cmd, "/info", true) == 0) {
new string2[2048];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
new o = OrgutID(playerid);
format(string,256,"Oyuncu Bilgisi - %s",GetName(playerid));
format(string2,2048,"Цldьrme: %d\nЦlьm: %d\nЦlьm/Цldьrme(KD): %s\nSeviye: %d\nExp: %d\nЦrgьt: %s\nPara: $%d\nBankadaki Para: $%d\nAyrıca bu komutu /bilgi (oyuncu id) olarak da kullanabilirsiniz.",PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths],PlayerInfo[playerid][Kills]/PlayerInfo[playerid][Deaths],GetLvl(playerid),GetExp(playerid),OrgutInfo[o][OrgutIsim],convertNumber(GetMemberStatsInt(GetName(playerid),"para")),convertNumber(GetPVarInt(playerid, #BANK_PVAR_MNY)));
return ShowPlayerDialog(playerid,3631,DIALOG_STYLE_MSGBOX,string,string2,"Tamam","");
}else{
new player1;
player1 = strval(tmp);
if(!IsPlayerConnected(player1) && player1 == INVALID_PLAYER_ID) return SendClientMessage(playerid,red,"Bцyle bir oyuncu yok.");
new o = OrgutID(player1);
format(string,256,"Oyuncu Bilgisi - %s",GetName(player1));
format(string2,2048,"Цldьrme: %d\nЦlьm: %d\nЦlьm/Цldьrme(KD): %s\nSeviye: %d\nExp: %d\nЦrgьt: %s\nPara: $%d\nBankadaki Para: $%d\nAyrıca bu komutu /bilgi (oyuncu id) olarak da kullanabilirsiniz.",PlayerInfo[player1][Kills],PlayerInfo[player1][Deaths],PlayerInfo[player1][Kills]/PlayerInfo[player1][Deaths],GetLvl(player1),GetExp(player1),OrgutInfo[o][OrgutIsim],convertNumber(GetMemberStatsInt(GetName(player1),"para")),convertNumber(GetPVarInt(player1, #BANK_PVAR_MNY)));
return ShowPlayerDialog(playerid,3631,DIALOG_STYLE_MSGBOX,string,string2,"Tamam","");
}
}
But,when i write the command it gives me an error.SERVER: Unknown command. why? :S
Re: Unknown Command? -
WagnerPM - 16.06.2012
pawn Код:
if(strcmp(cmd, "/info", true) == 0)
{
new string2[2048];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
new o = OrgutID(playerid);
format(string,256,"Oyuncu Bilgisi - %s",GetName(playerid));
format(string2,2048,"Цldьrme: %d\nЦlьm: %d\nЦlьm/Цldьrme(KD): %s\nSeviye: %d\nExp: %d\nЦrgьt: %s\nPara: $%d\nBankadaki Para: $%d\nAyr?ca bu komutu /bilgi (oyuncu id) olarak da kullanabilirsiniz.",PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths],PlayerInfo[playerid][Kills]/PlayerInfo[playerid][Deaths],GetLvl(playerid),GetExp(playerid),OrgutInfo[o][OrgutIsim],convertNumber(GetMemberStatsInt(GetName(playerid),"para")),convertNumber(GetPVarInt(playerid, #BANK_PVAR_MNY)));
return ShowPlayerDialog(playerid,3631,DIALOG_STYLE_MSGBOX,string,string2,"Tamam","");
}
else
{
new player1;
player1 = strval(tmp);
if(!IsPlayerConnected(player1) && player1 == INVALID_PLAYER_ID) return SendClientMessage(playerid,red,"Bцyle bir oyuncu yok.");
new o = OrgutID(player1);
format(string,256,"Oyuncu Bilgisi - %s",GetName(player1));
format(string2,2048,"Цldьrme: %d\nЦlьm: %d\nЦlьm/Цldьrme(KD): %s\nSeviye: %d\nExp: %d\nЦrgьt: %s\nPara: $%d\nBankadaki Para: $%d\nAyr?ca bu komutu /bilgi (oyuncu id) olarak da kullanabilirsiniz.",PlayerInfo[player1][Kills],PlayerInfo[player1][Deaths],PlayerInfo[player1][Kills]/PlayerInfo[player1][Deaths],GetLvl(player1),GetExp(player1),OrgutInfo[o][OrgutIsim],convertNumber(GetMemberStatsInt(GetName(player1),"para")),convertNumber(GetPVarInt(player1, #BANK_PVAR_MNY)));
return ShowPlayerDialog(playerid,3631,DIALOG_STYLE_MSGBOX,string,string2,"Tamam","");
}
return 1;
}