![]() |
Read This Plz (A Scripting Question)
How do i do somethin like if i touch a Ball
then if i touch another ball then i go to this house then i say Sell Balls then u get money? or if u dont get me, its just like pearl diving like i touch a peral then i go sell them. but im asking, how do i do the thingy where when i touch the ball then it adds +1 then i touch another ball then it adds +1 again anthen i go to a person who nuys balls then you say sell balls the nu get money corresponding how many balls u get.:grrr: |
well make a string and and each time the player touchs a NPC it hides and adds one to the string
|
so somthing like this:
if(playerenters){ setstring balls,0; } then in the balls: if(playertouchsme){ balls = balls + 1; } then to sell make a NPC like: if(playerchats&&(#c,sell balls)){ playerrupees = playerrupees + balls * 2; //to get 2 g for 1 ball setstring balls,0; } just try somthing like that. Im not sure if i did all of it right but thats just off the top of my head |
and
and how do i show something like this as a number:
client.bombs |
Quote:
|
Quote:
|
Re: and
Quote:
|
i mean leik
a weapon that shows howmany bombs/balls you have then when u fire it, it says (say2) leik this say2 You Have (NUMBER) Balls/Bombs. e.g/i.e You Have 9 Balls/Bombs :D |
Quote:
you should use a string for the number of balls so it will save even after the player logs off. |
:p *looks down* well I have 2 balls but here is what you could do:
NPC Code: |
Quote:
|
how do i use strings and how do i put it?
|
Quote:
|
some script for a ball npc
NPC Code: |
Quote:
NPC Code: Don't get mad at me if I'm wrong but I'm pretty sure that what I said is correct. |
Quote:
NPC Code: its shorter |
Does that even work? If it does it's not that much shorter...oh well.
|
i just like scripting it that way
|
if (playersays(sell balls))balls = balls - (#v(balls);
why wont it take away the balls that u had? |
i made a ball system here it goes
// NPC made by Fireball if (playerenters) {toweapons *Ball System; } if (playertouchsme) { } if(playersays(Show Balls)) say2 You have #v(balls) balls; if(playersays(sell balls)){ playerrupees = playerrupees + balls * 2; //to get 2 g for 1 ball setstring balls,0; balls = balls - (#v,balls); } |
Quote:
NPC Code: this is a better way of doing it |
Quote:
|
God damn lots of people all talking about each others balls, im starting to think ive gone to the wrong forum.....
|
if (playersays(Plays With Balls)) {
say2 SICK PERSON; setlevel2jail.graal,x,y; } lol but seriously, if (playersays(Sell Balls)) { ball string =0; } |
| All times are GMT +2. The time now is 01:45 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.