Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //POZOVI Komanda za mog Jaska! <3!
- if(strcmp(cmd, "/pozovi", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}Koristi: {FFFFFF}/pozovi [Igracev Broj]");
- return 1;
- }
- if(PlayerInfo[playerid][pPnumber] == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " Nemate telefon!");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* %s je uzeo telefon iz dzepa.", sendername);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- new phonenumb = strval(tmp);
- if(phonenumb == 555)
- {
- new mechanicworkers = 0;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][pJob] == 7 && JobDuty[i] == 1)
- {
- mechanicworkers++;
- }
- }
- if(mechanicworkers < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " Javili su se.");
- SendClientMessage(playerid, 0xBBE1F2AA, "Vlasnik (telefon): Zao nam je ali trenutno nemamo slobodnih automehanicara.");
- SendClientMessage(playerid, COLOR_GREY, " They hang up.");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "** %s-u treba automehanicar. (kucajte /prihvati mechanic da prihvatite poziv)", sendername);
- SendJobMessage(7, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_GREY, " Prihvatili su poziv.");
- SendClientMessage(playerid, 0xBBE1F2AA, "Vlasnik (telefon): Svim mehanicarima je javljeno o vasem pozivu.");
- SendClientMessage(playerid, COLOR_GREY, " Prekinuli su.");
- MechanicCall = playerid;
- return 1;
- }
- if(phonenumb == PlayerInfo[playerid][pPnumber])
- {
- SendClientMessage(playerid, COLOR_GRAD2, " Zauzeto je...");
- return 1;
- }
- if(Mobile[playerid] != 255)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " Vec zovete nekog...");
- return 1;
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
- {
- giveplayerid = i;
- Mobile[playerid] = giveplayerid; //caller connecting
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PhoneOnline[giveplayerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Taj igrac je offline!");
- return 1;
- }
- if (Mobile[giveplayerid] == 255)
- {
- format(string, sizeof(string), "Zvoni vam telefon, kucajte (/pickup) CallerID: %s", sendername);
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- RingTone[giveplayerid] = 10;
- format(string, sizeof(string), "* %s-ov telefon zvoni.", sendername);
- SendClientMessage(playerid, COLOR_WHITE, "Podjsetnik: Sada koristite ~ ili T da pricate preko telefona, kucajte /hangup ili /h da prekinete");
- ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- CellTime[playerid] = 1;
- return 1;
- }
- }
- }
- }
- }
- SendClientMessage(playerid, COLOR_GRAD2, " Zauzeto je...");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment