hey wie kann cihd as mahcen das wen ich jemanden eien Wanted gebe das ich das den nach her unter /wantedliste nach lesen kann ?
ocmd:wantedliste(playerid, params[])
{
new string[1024];
new p_wanted[50];
new p_name[MAX_PLAYER_NAME];
new wlevel;
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
wlevel = GetPlayerWantedLevel(i);
if(wlevel != 0)
{
GetPlayerName(i,p_name,sizeof(p_name));
format(p_wanted, sizeof(p_wanted), "ID %i %s - %d Wanteds\n", i,p_name, wlevel);
strcat(string, p_wanted, sizeof(string));
}
}
ShowPlayerDialog(playerid, DIALOG_WANTEDS, DIALOG_STYLE_LIST, "Aktuelle Personen Die Gesucht werden", string, "Ok", "");
}
return 1;
}
ocmd:wanted(playerid,params[])//wanted
{
if(fraktion(playerid,1) || arbeit(playerid,1))
{
new wanteds,pID;
new Wanted[128],Cop[128],Verbrecher[128],Grund[128];
if(sscanf(params,"uis",pID,wanteds,Grund))return SendClientMessage(playerid,ROT,"/wantedtest [Spieler] [Wantedzahl] [Grund]");
if(wanteds<1||wanteds>6)return SendClientMessage(playerid,ROT,"Du kannst nur minimal 1 Wanted oder maximal 6 Wanteds geben!");
SetPlayerWantedLevel(pID, GetPlayerWantedLevel(pID)+wanteds);
SetPVarInt(pID,"Wanted",GetPlayerWantedLevel(pID));
format(Cop,sizeof(Cop)," Du hast %s Wanteds gegeben. Grund %s",SpielerName(pID),wanteds,Grund);
format(Verbrecher,sizeof(Verbrecher)," %s hat dir %i Wanteds Gegeben. Grund: %s",SpielerName(playerid),wanteds,Grund);
format(Wanted,sizeof(Wanted), "Nun ist dein Wantedlevel auf %i gestiegen!",GetPlayerWantedLevel(pID));
SendClientMessage(playerid,BLAU,Cop);
SendClientMessage(pID,ROT,Verbrecher);
SendClientMessage(pID,ROT,Wanted);
SpielerSpeichern(pID);
}
else
{
SendClientMessage(playerid,ROT,"Du bist Kein Cop!");
}
return 1;
}
lg kifkat