Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook OnPlayerEnterCheckpoint(playerid)
- {
- if(LagiRestock[playerid])
- {
- for(new i = 0; i < MAX_ARMOURY; i++)
- {
- PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
- if(RestockStep[playerid] == 1)
- {
- SetPlayerCheckpoint(playerid, 2847.1731, 983.3269, 10.7500, 5.0);
- RestockStep[playerid] = 2;
- }
- else if(RestockStep[playerid] == 2)
- {
- new string[256];
- if(ArmouryData[i][armouryID] != 0){
- format(string, sizeof(string), "%s{ADC3E7}%d\t\t%s\n", string, ArmouryData[i][armouryID], ArmouryData[i][armouryName]);
- ShowPlayerDialog(playerid, DIALOG_RESTOCK, DIALOG_STYLE_LIST, "Armoury List", string, ">>>", "");
- }
- }
- else if(RestockStep[playerid] == 3)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, ArmouryData[i][armouryRestockPos][0], ArmouryData[i][armouryRestockPos][1], ArmouryData[i][armouryRestockPos][2]))
- {
- new string[128];
- DisablePlayerCheckpoint(playerid);
- LagiRestock[playerid] = false;
- RestockStep[playerid] = 0;
- ArmouryData[i][armouryAmount] = 100000;
- format(string, sizeof(string), "[id:%d]\n%s\n%d/100000\nType '/armoury' to pick or store armoury", i, ArmouryData[i][armouryName], ArmouryData[i][armouryAmount]);
- ArmouryData[i][armouryLabel] = CreateDynamic3DTextLabel(string, COLOR_DARKGREEN, ArmouryData[i][armouryPos][0], ArmouryData[i][armouryPos][1], ArmouryData[i][armouryPos][2], 15.0);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement