27.07.2015, 23:16
Well , if somebody use this command suddently none of other commands work ,and the chat goes Name:message global , i don't understand why.
here's the code
here's the code
pawn Код:
if(strcmp(cmd, "/mdc", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mdc [name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
new jucator = giveplayerid;
if(IsPlayerConnected(jucator))
{
new stringul[856];
new stringul2[856];
strcat(stringul, "{9E9E9E}__________________________________");
format(stringul2, 456, "\n{f48555}Nume jucгtor: %s(%d)", GetName(jucator), jucator);
strcat(stringul,stringul2);
new stringulnumar[456];
format(stringulnumar, 456, "%d", PlayerInfo[jucator][pPnumber]);
strins(stringulnumar, "-", 3);
format(stringul2, 456, "\n{f48555}Numгr de telefon: %s", stringulnumar);
strcat(stringul,stringul2);
new sex[50];
if(PlayerInfo[jucator][pSex] == 1) { sex = "Masculin"; }
else { sex = "Feminin"; }
format(stringul2, 456, "\n{f48555}Sex: %s", sex);
strcat(stringul,stringul2);
format(stringul2, 456, "\n{f48555}Nivel de urmгrire: %d.", PlayerInfo[jucator][pWanted]);
strcat(stringul,stringul2);
format(stringul2, 456, "\n{f48555}Adresг de locuintг: %d", PlayerInfo[jucator][pPhousekey]);
strcat(stringul,stringul2);
format(stringul2, 456, "\n{f48555}Data nasterii: %s", PlayerInfo[jucator][pRegisterDate]);
strcat(stringul,stringul2);
new jtext[450];
new targetid = jucator;
if(PlayerInfo[targetid][pJob] == 1) { jtext = "Arms dealer"; }
else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Farmer"; }
else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Detectiv"; }
else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Remorcher"; }
else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Electronist"; }
else if(PlayerInfo[targetid][pJob] == 6) { jtext = "Gunoier"; }
else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Miner"; }
else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Chelner"; }
else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Conductor"; }
else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Trucker"; }
else { jtext = "Nu lucreazг "; }
format(stringul2, 456, "\n{f48555}Slujbг: %s", jtext);
strcat(stringul,stringul2);
strcat(stringul, "\n{9E9E9E}__________________________________");
format(stringul2, 456, "\n{f48555}Licentele:");
strcat(stringul,stringul2);
new text1[90];
new text2[90];
new text3[90];
new text4[90];
new text5[90];
if(PlayerInfo[jucator][pCarLic])
{
format(text1, 90, "\n{f48555}Driving: obtinutг - %d ore.", PlayerInfo[jucator][pCarLicExp]);
strcat(stringul,text1);
}
else
{
format(text1, 90, "\n{f48555}Driving: fгrг.");
strcat(stringul,text1);
}
if(PlayerInfo[jucator][pFlyLic])
{
format(text2, 90, "\n{f48555}Flying: obtinutг - %d ore.", PlayerInfo[jucator][pFlyLicExp]);
strcat(stringul,text2);
}
else
{
format(text2, 90, "\n{f48555}Flying: fгrг.");
strcat(stringul,text2);
}
if(PlayerInfo[jucator][pBoatLic])
{
format(text3, 90, "\n{f48555}Boat: obtinutг - %d ore.", PlayerInfo[jucator][pBoatLicExp]);
strcat(stringul,text3);
}
else
{
format(text3, 90, "\n{f48555}Boat: fгrг.");
strcat(stringul,text3);
}
if(PlayerInfo[jucator][pGunLic])
{
format(text4, 90, "\n{f48555}Weapon: obtinutг - %d ore.", PlayerInfo[jucator][pGunLicExp]);
strcat(stringul,text4);
}
else
{
format(text4, 90, "\n{f48555}Weapon: fгrг.");
strcat(stringul,text4);
}
if(PlayerInfo[jucator][pFishLic])
{
format(text5, 90, "\n{f48555}Fishing: obtinutг - %d ore.", PlayerInfo[jucator][pFishLicExp]);
strcat(stringul,text5);
}
else
{
format(text4, 90, "\n{f48555}Fishing: fгrг.");
strcat(stringul,text5);
}
CopFind[playerid] = jucator;
strcat(stringul, "\n{9E9E9E}__________________________________");
ShowPlayerDialog(playerid, DIALOG_MDCINFO, DIALOG_STYLE_MSGBOX, "{9E9E9E}Mobile Data Computer", stringul, "Find", "Cancel");
SendClientMessage(playerid, COLOR_LIGHTRED, ":: Dispecerat :: Ai primit toate informatiile disponibile in legгturг cu acea persoanг.");
}
else return SendClientMessage(playerid, COLOR_GRAD2, " Invalid player id.");
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "You are not a cop.");
return 1;
}
return 1;
}