Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: NeskWriter on August 23, 2012, 05:18:38 pm

Title: Napalm making system
Post by: NeskWriter on August 23, 2012, 05:18:38 pm
It was nothing to do
I get an idea and I've created napalm making system using 3 items
It's my first thing i made in PAWNO, i made it though scores adding. Comments pls.
So:
put in public OnGameModeInit()
[pawn]   
    AddStaticPickup(1, 578, 37.50, -1056.25, 10.25);
    AddStaticPickup(2, 597, 191.25, -1013.75, 11.375);
    AddStaticPickup(3, 409, 11.25, -950, 10);[/pawn]
put in public OnPlayerCommandText(playerid, cmdtext[])
[pawn]
{
    if (strcmp(cmdtext, "makenapalm", true)==0 && GetPlayerScore(playerid)==3)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You made napalm from materials you got");
        SetPlayerWeapon(playerid, 15, 1);
        SetPlayerScore(playerid, -3);
        return 1;
    }
    else if (strcmp(cmdtext, "makenapalm", true)==0 && GetPlayerScore(playerid)<=3)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You do not have one more materials");
        return 1;
    }
return 0;
}[/pawn]

and in public OnPickedUp(pickupid, playerid)
[pawn]
{
    if(pickupid==1)
    {
        GameTextForPlayer(playerid, "~w~You got a can of gas");
        SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
    }
    if(pickupid==2)
    {
        GameTextForPlayer(playerid, "~w~You got a wine bottle");
        SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
    }
    if(pickupid==3)
    {
        GameTextForPlayer(playerid, "~w~You got a fuse");
        SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
    }
    return 1;
}
[/pawn]
Title: Re: Napalm making system
Post by: NeskWriter on August 23, 2012, 05:20:38 pm
Now, using /c makenapalm you will create napalm from materials you get.
I will put here map with materials. Wait for this.
Sorry for my bad english :'(
Title: Re: Napalm making system
Post by: NeskWriter on August 23, 2012, 05:46:47 pm
you can change it and end it, here is a map: http://imageshost.ru/photo/196567/id2293136.html
Title: Re: Napalm making system
Post by: cocky on August 24, 2012, 05:23:39 am
Great idea, Collecting materials and making weapons. Add more weapons  ;)
Title: Re: Napalm making system
Post by: Fuzzy168 on August 24, 2012, 07:39:09 am
This post should be posted here (http://forum.vicecitymultiplayer.com/index.php?board=37.0).

It's my first thing i made in PAWNO

Its Pawn not Pawno..
Code: [Select]
[pawn]See this? Pawn??
Title: Re: Napalm making system
Post by: NeskWriter on August 24, 2012, 09:25:09 am
Maaan