ONEMDX | Дата: Четверг, 26.07.2012, 17:27 | Сообщение # 1 |
- Сообщения: 7
- Награды: 0
- Замечания:
|
its a plugin , sort of game ... when you die , server put some questions ... if you give the correct answer plugin give you money .... how can i make plugin to give xp ?
this is the function for money
public HookSay(id) { new Args[256]; read_args(Args, CharsMax(Args)); if(containi(Args, CurrentAnswer) != -1 && TriviaOnOff[id]) { new RndNum = random(500); ColorChat(id, RED, "%s^x01Your answer is correct.Congratulations,you won %d$", PluginTag, RndNum); TriviaPoints[id] += 1; if(is_user_connected(id)) cs_set_user_money(id, cs_get_user_money(id) + RndNum, 0); ShowQuestion(); return 1; } else if(equali(Args, "^"/trivia^"", 9)) { if(!TriviaOnOff[id]) { ColorChat(id, RED, "%s^x04You joined the trivia bot, now you can play while dead!", PluginTag); TriviaOnOff[id] = true; } else { ColorChat(id, RED, "%s^x04You leaved the trivia bot, you can't play anymore!", PluginTag); TriviaOnOff[id] = false; } } return 0; }
i try to make it ... for giving xp ... but is dosent work ...
server_cmd("amx_givexp ^"%s^" %d",id,RndNum);
plugin is compiled good but plugin dont give xp ...
|
|
| |
runetov | Дата: Четверг, 26.07.2012, 18:14 | Сообщение # 2 |
- Сообщения: 283
- Награды: 8
- Замечания:
|
ONEMDX, Пиши по русский не все знают Английский пользуйся переводчиком и пиши
|
|
| |
ONEMDX | Дата: Четверг, 26.07.2012, 18:42 | Сообщение # 3 |
- Сообщения: 7
- Награды: 0
- Замечания:
|
its ok ... i find how ....
CLOSED
|
|
| |