Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (strcmp(cmd, "/gettaarma", true) == 0)
- {
- new gunID = GetPlayerWeapon(playerid);
- new gunAmmo = GetPlayerAmmo(playerid);
- if(gunID != 0 && gunAmmo != 0)
- {
- new f = maxobj+1;
- for(new a = 0; a < sizeof(ObjCoords); a++)
- {
- if(ObjCoords[a][0] == 0.0) f = a;
- }
- if(CopOnDuty[playerid] == 1)
- return SendClientMessage(playerid, COLOR_ISCHIAC, "[ERRORE]: Sei in servizio, non puoi gettare un'arma a terra.");
- if(f == maxobj+1) return SendClientMessage(playerid, COLOR_ISCHIAC, "[ERRORE]:Non puoi gettare armi a terra, prova più tardi!");
- else
- {
- if(Difendere[playerid] > 0 || Attaccare[playerid] > 0)
- {
- SendClientMessage(playerid,COLOR_ISCHIAC,"[ERRORE]: Non puoi farlo in questo momento, sei in una clan war");
- return 1;
- }
- new gunname[100];
- new buffer[512];
- new year, month,day;
- getdate(year, month, day);
- GetWeaponNameEx(gunID, gunname, sizeof(gunname));
- GetPlayerName(playerid,sendername,sizeof(sendername));
- format(string,sizeof(string), "* %s getta qualcosa a terra: %s (%d-%d-%d)", sendername, gunname, day,month,year);
- ProxDetector(30.0, playerid, string, COLOR_JOBCOLOR,COLOR_JOBCOLOR,COLOR_JOBCOLOR,COLOR_JOBCOLOR,COLOR_JOBCOLOR);
- format(buffer, sizeof(buffer), "[INFO]: Hai gettato %s a terra.", gunname);
- SendClientMessage(playerid, COLOR_WHITE, buffer);
- RemovePlayerWeapon(playerid, gunID);
- ObjectID[f][0] = gunID;
- ObjectID[f][1] = gunAmmo;
- GetPlayerPos(playerid, ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]);
- object[f] = CreateDynamicObject(GunObjects[gunID][0],ObjCoords[f][0],ObjCoords[f][1],ObjCoords[f][2]-1,93.7,120.0,120.0);
- AzioniarmiLog(string);
- }
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement