08.11.2016, 08:00
Hi everyone, I'm here with a new question. Like the title says, I want to create a tiki system, lets say I added 50 tiki pickups, and each one give something to players that picked them up. My question is, how I should do if I want players to pick them just once, and what I have to do to identify when a player picks up all of them.
Below you will find an example of what I want to make.
Below you will find an example of what I want to make.
Код:
new tiki1,....tiki50; new Picked[MAX_PLAYERS]; tiki1 = CreatePickup(1234, X, Y, Z, -1); etc public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == tiki1) { if(!Picked[playerid]) { SendClientMessage(playerid, COLOR_GREY, "Ai gasit o statueta tiki si ai primit 5RP!"); PlayerInfo[playerid][pExp] += 5; Picked[playerid] ++; } else { } } if(pickupid == tiki2) { if(!Picked[playerid]) { SendClientMessage(playerid, COLOR_GREY, "Ai gasit o statueta tiki si ai primit un level up!"); SendClientMessage(playerid, COLOR_GREY, "Felicitari,ai colectat toate tiki-urile si ai mai primit un bonus de 1.5kk!"); PlayerInfo[playerid][pLevel] +=1; GivePlayerMoney(playerid, 1500000); Picked[playerid] ++; } else { } } return 1; }