SA-MP Forums Archive
How would you do this. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How would you do this. (/showthread.php?tid=98548)



How would you do this. - shitbird - 21.09.2009

Allright, let me hear it.

Let's take for an example, you are going to create Different Names and store them somewhere, then later on you would have to check if the variable you have is matching the Name you created earlier on, how would you do that?

Like...

If someone writes a command, and the command parameters matches the names you stored earlier, it would give him 10$ money.


Re: How would you do this. - Ov3rl0rd - 22.09.2009

What confuses me in your question is, are you saying that a player picks a name and than later it checks there name, and if that is there name they get something? Or is it more of a pick a number concept?


Re: How would you do this. - shitbird - 22.09.2009

Yes, if a player picks a name then later it checks if the name is something, and if it's something it gives them 10$.

Like if you create a variable, and that variable has "Text" in it, Not numbers.

If checks the 'Text' that the player wrote, and if that Text matches a word like 'MHR' it gives them 900$


Re: How would you do this. - Mike Garber - 22.09.2009

You mean like a Lotto system, but with text instead, and without timer, with preset words in a .txt file In scriptfiles?


Re: How would you do this. - shitbird - 22.09.2009

... umm, that could work?...


Re: How would you do this. - Ov3rl0rd - 22.09.2009

Yea basically create a command where a player does like /pick [name] and it stores the names in a file, and also in the users file (so it saves who picked what name). Than you could make a command like /winner and it randomly grabs a name from the file and after it pulls that name it checks user files for the player with that name chosen.c