Vice City Multiplayer
General Discussion => Support => Tutorials => Topic started by: JackDawZ on October 24, 2012, 12:14:41 pm
-
if you want to make the pickup with many functions, read my article.
For a beginning:
#define JACK_WHITE 0xFFFFFFAA // Copypast to your pwn file
1st Step. To add pickup
public OnGameModeInit()
{
AddStaticPickup (1, 410, -442.8760, -315.8749, 11.1867); // Hidden Package
AddStaticPickup (2, 356, -703.3553, -411.1085, 10.5188); // Box
2nd Step. to make a function of the pickup
public OnPickedUp(playerid,pickupid)
{
if ( pickupid == 1) // Function of 1st pickup
{
SetPlayerMoney(playerid,GetPlayerMoney(playerid) + 5000); // +5.000$ to the cash
SendClientMessage(playerid, JACK_WHITE, "You picked up hidden package! Award: 5000$");
}
if ( pickupid == 2) // Function of 2nd pickup
{
SetPlayerWeapon(playerid, 21, 500); // Gives a stubby
SendClientMessage(playerid, JACK_WHITE, "You picked up box with a stubby shotgun!");
}
return 1;
}
-
Good Job.
Good for begginers ! ;)
P.S.: Next time use [ code ] not [ quote ]
Exist and [ pawn ] but is a bit bugged so ... use [ code ]
CODE:
Is for code => can be used for scripts.
QUOTE:
Isn't for code / pawno code => is not for scripts.
PAWN:
[pawn]Is for Pawno Code.[/pawn]
When you copy/paste a script in [ pawn ] , is possible to show wrong some parts !
[pawn]new RandomPlayerJailSpawns[][playerjailspawns] = {
{387.0193,-510.2893,9.3956},
{388.4367,-511.6012,9.3956}
};[/pawn]
Same code but I used [ code ]
new RandomPlayerJailSpawns[][playerjailspawns] = {
{387.0193,-510.2893,9.3956},
{388.4367,-511.6012,9.3956}
};
-
Good Job.
Good for begginers ! ;)
P.S.: Next time use [ code ] not [ quote ]
Exist and [ pawn ] but is a bit bugged so ... use [ code ]
CODE:
Is for code => can be used for scripts.
QUOTE:
Isn't for code / pawno code => is not for scripts.
PAWN:
[pawn]Is for Pawno Code.[/pawn]
When you copy/paste a script in [ pawn ] , is possible to show wrong some parts !
[pawn]new RandomPlayerJailSpawns[][playerjailspawns] = {
{387.0193,-510.2893,9.3956},
{388.4367,-511.6012,9.3956}
};[/pawn]
Same code but I used [ code ]
new RandomPlayerJailSpawns[][playerjailspawns] = {
{387.0193,-510.2893,9.3956},
{388.4367,-511.6012,9.3956}
};
It's not pawno code, but PAWN code. ( Pawno is the editor, PAWN is the language.. )
-
It's not pawno code, but PAWN code. ( Pawno is the editor, PAWN is the language.. )
I know.
But I told Pawno Code cuse "Pawno Code" appears above code. ;)
First time I typed "Pawn Code" , but I saw that and I wanted to tell how is there.
[pawn]Pawno Code[/pawn]
-
Good Job.
Good for begginers ! ;)
P.S.: Next time use [ code ] not [ quote ]
Exist and [ pawn ] but is a bit bugged so ... use [ code ]
CODE:
Is for code => can be used for scripts.
QUOTE:
Isn't for code / pawno code => is not for scripts.
PAWN:
[pawn]Is for Pawno Code.[/pawn]
When you copy/paste a script in [ pawn ] , is possible to show wrong some parts !
[pawn]new RandomPlayerJailSpawns[][playerjailspawns] = {
{387.0193,-510.2893,9.3956},
{388.4367,-511.6012,9.3956}
};[/pawn]
Same code but I used [ code ]
new RandomPlayerJailSpawns[][playerjailspawns] = {
{387.0193,-510.2893,9.3956},
{388.4367,-511.6012,9.3956}
};
Ok thanks. I have understood.