View Single Post
  #2  
Old 03-06-2001, 02:31 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote