Question| Its gonna work ?
#1

Okay so i made a command that will heal people its for RP for the medics.... will it work ? if not fix it please..

Код:
		if(strcmp(cmd, "/tryheal", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new playa;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			new succeed = 1 + random(2);
			if(succeed == 1)
			{
				SetPlayerHealth(playa, 75);
				format(string, sizeof(string), " %s tries to heal %s and succeeded.");
				ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
			else if(succeed == 2)
			{
				format(string, sizeof(string), " %s tries to heal %s and failed.");
				ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
		}
		return 1;
	}
Reply
#2

Why don't you compile it and try it yourself? That is the best way to know if the code will work.
Reply
#3

lmao thats command sense.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)