Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   Help me here with this NPC. (https://forums.graalonline.com/forums/showthread.php?t=36)

SilverAngel 03-06-2001 01:11 AM

heres da damn script
tell me whats wrong.
thanks

-----------------------------

if (playerenters&&!server.vote) {
setarray server.vote,2;
vote[0] = 0;
vote[1] = 0;
}
if (strequals(#c,Vote Yes)&&!voted) {
vote[0]++;
set voted;
}
if (strequals(#c,Vote No)&&!voted) {
vote[1]++;
set voted;
}
if (playersays(results)) {
message Yes - #s(vote[0]) No - #s(vote[1]);
}

Admins 03-06-2001 02:31 AM

It should look like this:

if (playerchats) {
if (!voted) {
if (strequals(#c,vote yes)) {
setstring server.voteyes,#v(strtofloat(#s(server.voteyes))+1 );
set voted;
}
if (strequals(#c,vote no)) {
setstring server.voteno,#v(strtofloat(#s(server.voteno))+1);
set voted;
}
}
if (strequals(#c,show results))
message Yes - #s(server.voteyes), No - #s(server.voteno);
}

The hardest part is probably the setstring thing,
but it is needed to store the result as a
server flag.

03-06-2001 02:34 AM

Hey Angel your signature is way too big guy!

FatherDante 03-06-2001 03:55 AM

No way, that sig is coooool

Fai 03-06-2001 03:09 PM

It is um too big.

Cali_2001 03-06-2001 09:54 PM

Yea it is kinda big but atleast it looks cool ^_^

Andor_Admin1 01-06-2002 12:35 AM

Um, Stefan's first post? *bump*

Faheria_LAT1 01-06-2002 04:53 AM

I lost the password to that account x_x and ive been trying to get it back forever :(

It says "Temporarily disabled" o_O lol.. havent used it since March and now its disabled lol.. cool.

Hey wait.. What was the sig?? I just cant remember lol..
This was when there were no Scripting forum.. I guess O_o

thomasward 01-07-2002 07:53 AM

Shouldn't this thread be in the NPC scripting forum anyways?


All times are GMT +2. The time now is 03:52 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.