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]