[HELP!!!]Fairy code

04/15/2014 18:18 Kubixiorek#1
I need to repair this fairy code, this need to look this:
When fairy id == 41 then element of character == water(2)
I'm really really bad in programming
Fairies working but when id == 41 element is still 0 (like other fairies)
pls help

Code:
void Fairy(int plrid, std::string id){
		std::string atrybut;
		std::string packet = Encrypt("pairy 1 " + IntegerToString(pg[plrid].Number) + " 4 0 30 " + id);
		for (int i = 0; i < clients; i++)
		{
		if (id[i] == 41);
		Encrypt("pairy 1 " + IntegerToString(pg[plrid].Number) + " 4 " + "2" + " 70 41");
		}
		for (int i = 0; i < clients; i++)
		{
			if (pg[i].Online == 0 && pg[i].Map == pg[plrid].Map)
			{
				for (int i = 0; i < clients; i++) if (pg[i].Online == 0 && pg[i].Map == pg[plrid].Map) send(Connection[i], packet.c_str(), packet.size(), 0);
			}
		}
	}
04/15/2014 18:49 Guiso90#2
#edit sry
but why you look for this
std::string packet = Encrypt("pairy 1 " + IntegerToString(pg[plrid].Number) + " 4 0 30 " + id);
and send this?
Encrypt("pairy 1 " + IntegerToString(pg[plrid].Number) + " 4 " + "2" + " 70 41");
04/15/2014 19:40 Kubixiorek#3
std::string packet = Encrypt("pairy 1 " + IntegerToString(pg[plrid].Number) + " 4 0 30 " + id); == any other fairy, with no element. (0)

Encrypt("pairy 1 " + IntegerToString(pg[plrid].Number) + " 4 " + "2" + " 70 41"); water fairy (id 41) == water element (2)