- Definindo os pickups
Bom, primeiramente vamos definir o(s) pickup(s) usando 'new':
PAWN Code:
new NovoPickup;
- Criando os pickups
Para esse tutorial, estou criando um FilterScript de exemplo, portanto vou criar o(s) pickup(s) em OnFilterScriptInit, se você for colocar no seu GameMode é claro, coloque em OnGameModeInit, então vai a função:
NovoPickup = CreatePickup(1239, 1, 405.85,2541.47,16.55);
Agora a explicação:
1239 = ID do pickup, no caso do tutorial é o pickup de informação, aquele 'i'.
1 = O tipo de pickup, no caso do tutorial é o pickup que não desaparece.
405.85,2541.47,16.55 = As coordenadas do pickup, onde ele vai estar, no tutorial está no aeroporto abandonado de Las Venturas.
No fim do tutorial tem os IDs dos pickups e os tipos.
- public OnPlayerPickUpPickup(playerid, pickupid)
Se este public não existe no seu script, crie-o, vamos ao exemplo continuando o tutorial:
PAWN Code:
public OnPlayerPickUpPickup(playerid, pickupid) { // Início do public
if(pickupid == NovoPickup) { // Pickup definido
GameTextForPlayer(playerid,"~w~Armas!", 6000,4); // Ações que serão feitas ao passar por cima do pickup
GivePlayerWeapon(playerid,24,9999999999); // No caso do exemplo, ele está dando armas e mostrando um GameText.
GivePlayerWeapon(playerid,27,9999999999);
GivePlayerWeapon(playerid,29,9999999999);
GivePlayerWeapon(playerid,31,9999999999);
GivePlayerWeapon(playerid,34,9999999999);
}
//No caso de mais pickups apenas faça o mesmo:
// if(pickupid == pickup){
// ações ao passar nele
// }
return 1;
}// Fim do public
if(pickupid == NovoPickup) { // Pickup definido
GameTextForPlayer(playerid,"~w~Armas!", 6000,4); // Ações que serão feitas ao passar por cima do pickup
GivePlayerWeapon(playerid,24,9999999999); // No caso do exemplo, ele está dando armas e mostrando um GameText.
GivePlayerWeapon(playerid,27,9999999999);
GivePlayerWeapon(playerid,29,9999999999);
GivePlayerWeapon(playerid,31,9999999999);
GivePlayerWeapon(playerid,34,9999999999);
}
//No caso de mais pickups apenas faça o mesmo:
// if(pickupid == pickup){
// ações ao passar nele
// }
return 1;
}// Fim do public
Simples não ?
- IDs dos pickups
Code:
1210 - Briefcase
1212 - Money
1239 - Onformation
1240 - Heart
1241 - Adrenaline pill
1242 - Armor
1247 - Bribe
1248 - Gta 3 logo
1252 - Grey bomb
1253 - Photo Op
1254 - rampage (single skull)
1313 - two player rampage (skulls)
1272 - blue house
1273 - green house
1274 - dollar
1275 - blue t-shirt
1276 - tiki
1277 - save disk
1279 - drug bundle
1313 - 2 skulls icon
1314 - 2 player
1316 - Corona (textures missing)
1317 - Checkpoint (textures missing)
1318 - White arrow (pointing down)
1559 - Interior enter/exit diamond
1582 - Pizza Box
2894 - Madd Dogg's rhyme book
1212 - Money
1239 - Onformation
1240 - Heart
1241 - Adrenaline pill
1242 - Armor
1247 - Bribe
1248 - Gta 3 logo
1252 - Grey bomb
1253 - Photo Op
1254 - rampage (single skull)
1313 - two player rampage (skulls)
1272 - blue house
1273 - green house
1274 - dollar
1275 - blue t-shirt
1276 - tiki
1277 - save disk
1279 - drug bundle
1313 - 2 skulls icon
1314 - 2 player
1316 - Corona (textures missing)
1317 - Checkpoint (textures missing)
1318 - White arrow (pointing down)
1559 - Interior enter/exit diamond
1582 - Pizza Box
2894 - Madd Dogg's rhyme book
- Tipos de pickups
Code:
0 - The pickup does not display.
1 - Not pickupable, exists all the time.
2 - Pickupable, respawns after some time.
3 - Pickupable, respawns after death
4 - Disappears shortly after created (perhaps for weapon drops?)
5 - Disappears shortly after created (perhaps for weapon drops?)
8 - Pickupable, but has no effect. Disappears automatically.
11 - Blows up a few seconds after being created (bombs?)
12 - Blows up a few seconds after being created.
13 - Slowly decends to the ground.
14 - Pickupable, but only when in a vehicle. Falls through objects made with CreateObject, etc.
15 - Pickupable, respawns after death
19 - Pickupable, but has no effect (information icons?)
22 - Pickupable, respawns after death.
23 - Pickupable, but doesn't disappear on pickup.
1 - Not pickupable, exists all the time.
2 - Pickupable, respawns after some time.
3 - Pickupable, respawns after death
4 - Disappears shortly after created (perhaps for weapon drops?)
5 - Disappears shortly after created (perhaps for weapon drops?)
8 - Pickupable, but has no effect. Disappears automatically.
11 - Blows up a few seconds after being created (bombs?)
12 - Blows up a few seconds after being created.
13 - Slowly decends to the ground.
14 - Pickupable, but only when in a vehicle. Falls through objects made with CreateObject, etc.
15 - Pickupable, respawns after death
19 - Pickupable, but has no effect (information icons?)
22 - Pickupable, respawns after death.
23 - Pickupable, but doesn't disappear on pickup.
Se alguém que fala inglês traduzir isso acima, eu agradeço
- Fim do tutorial
É bem simples, mas espero que ajude, e talvez mais tarde posto imagens e o FilterScript de exemplo. (Agora estou gravando uns DVDs, então não dá xD)

Nenhum comentário:
Postar um comentário