Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new DialogTemp[MAX_PLAYERS][50];
- new DialogTempIndex[MAX_PLAYERS]; //beide global
- if(strcmp(cmd,"/aufträge", true) == 0) // jobchat
- {
- if(PlayerInfo[playerid][pMember] != 4)// WAS IST SMEMBER DFFFFFF
- {
- SCM(playerid, COLOR_GRAD2, "Du bist kein Sanitäter!");
- return 1;
- }
- if(JobDuty[playerid] == 0) return SCM(playerid,-1,"Du bist nicht im Dienst und kannst keine Notrufe empfangen!");
- DialogTempIndex[playerid] = 0;
- new mvstring[2024];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pTot] == 1)
- {
- DialogTemp[playerid][DialogTempIndex[playerid]++] = i;
- new LocationZone[MAX_ZONE_NAME];
- Get2DZone(PlayerInfo[i][pTx],PlayerInfo[i][pTy], LocationZone, MAX_ZONE_NAME);
- format(mvstring, sizeof(mvstring), "%s%s ( ID: %d ) Position: %s, Restliche Zeit: %d\n",mvstring,GetName(i),i,LocationZone,PlayerInfo[i][pTotTime]); // geht das ?
- }
- }
- }
- if(DialogTempIndex[playerid] == 0)
- {
- SCM(playerid, COLOR_GRAD2, "Derzeit sind keine Aufträge verfügbar!");
- return 1;
- }
- ShowPlayerDialog(playerid,DIALOG_AUFTRAGE,DIALOG_STYLE_LIST,"Sanitäter Aufträge",mvstring,"Auswählen","Abbrechen");
- return 1;
- }
- if(dialogid == DIALOG_AUFTRAGE)
- {
- new i = DialogTemp[playerid][listitem];
- SetPlayerCheckpoint(playerid, PlayerInfo[i][pPos_x],PlayerInfo[i][pPos_y],PlayerInfo[i][pPos_z], 3.0);// Timer als Gametext setten wenn auftrag angenommen wird
- printf("pPos_x: %f, pPos_y: %f, pPos_z: %f",PlayerInfo[i][pPos_x],PlayerInfo[i][pPos_y],PlayerInfo[i][pPos_z]);
- new stringd[128];
- format(stringd,128,"<< %s %s hat den Auftrag von %s angenommen! >>",GetFrakRang(PlayerInfo[playerid][pRank],PlayerInfo[playerid][pMember]),GetName(playerid),GetName(i));
- SendFamilyMessage(4, COLOR_LIGHTRED, stringd);
- format(stringd, sizeof(stringd), "* Du hast den Auftrag von %s angenommen! Du hast nun %d Sekunden Zeit.", GetName(i),PlayerInfo[i][pTotTime]);
- SCM(playerid, COLOR_LIGHTBLUE, stringd);
- format(stringd, sizeof(stringd), "* Arzt %s hat deinen ruf angenommen und ist nun unterwegs zu dir.", GetName(playerid));
- SCM(i, COLOR_LIGHTBLUE, stringd);
- PlayerInfo[playerid][pAuftrag] = PlayerInfo[i][pTotTime];
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement