23.03.2013, 23:51
Hi Scripters.I need help with my command. My command is /showlicenses but when i put the id send me a message with text: SERVER: Unknown Command
pawn Код:
if(strcmp(cmd,"/pokazilicenci",true)==0 || strcmp(cmd,"/showlicenses",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}/showlicenses [ID/Ime na Igracot].");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new text1[20];
new text2[20];
new text3[20];
new text4[20];
new text5[20];
if(PlayerInfo[playerid][pCarLic]) { text1 = "{6EF83C}Ima"; } else { text1 = "{FF4040}Nema"; }
if(PlayerInfo[playerid][pFlyLic]) { text4 = "{6EF83C}Ima"; } else { text4 = "{FF4040}Nema"; }
if(PlayerInfo[playerid][pBoatLic]) { text2 = "{6EF83C}Ima"; } else { text2 = "{FF4040}Nema"; }
if(PlayerInfo[playerid][pFishLic]) { text3 = "{6EF83C}Ima"; } else { text3 = "{FF4040}Nema"; }
if(PlayerInfo[playerid][pGunLic]) { text5 = "{6EF83C}Ima"; } else { text5 = "{FF4040}Nema"; }
format(text1, sizeof(text1), "Vozacka Dozvola: %s", text1);
format(text2, sizeof(text2), "Dozvola za Letanje: %s", text4);
format(text3, sizeof(text3), "Dozvola za Plovidba: %s", text2);
format(text4, sizeof(text4), "Dozvola za Ribolov: %s", text3);
format(text4, sizeof(text5), "Dozvola za Oruzje: %s", text5);
format(string,1234,"\n%s\n%s\n%s\n%s\n%s",text1,text2,text3,text4,text5);
ShowPlayerDialog(playerid, 85, DIALOG_STYLE_MSGBOX, "OK");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Igracot ne e do vas.");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nema takov igrac.");
return 1;
}
}
return 1;
}