Ned help with multiple things.
#1

How would I make it so when you talk down the radio and say "Permission to enter the garage, over." You'd be telepored inside the garage? I tried using SetPlayerPos etc but I honestly couldn't figure it out.

One last thing lol, how would I make a /setrank command for FACTION LEADERS.
pawn Код:
Player[playerid][IsLeader] == 1)
Reply
#2

Are you using a script FULLY scripted from scratch? If not, please tell us which script you're using.
Reply
#3

For the first query, use strfind to see if those words are said on the radio.

For the second, which command processor are you using? If you are using sscanf and ZCMD it's fairly simple.
Reply
#4

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
For the first query, use strfind to see if those words are said on the radio.

For the second, which command processor are you using? If you are using sscanf and ZCMD it's fairly simple.
I'm using zcmd for the whole script.

Also, I have some filterscripts if you count that as "FULLY from scratch".
Reply
#5

Код:
if(strcmp(cmd, "/setrank", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "[Command] /setrank [playerid/PartOfName] [Number(1-6)]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
                        if(level > 6 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Rank Min = 0 & Rank Max = 6"); return 1; }
			if (Player[playerid][IsLeader] == 1 && Player[playerid][Faction] == Player[para1][Faction])
			{
				if(IsPlayerConnected(para1))
				{
					if(para1 != INVALID_PLAYER_ID)
					{
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						Player[para1][Rank] = level;
						// Here you have to save your player (OnPlayerUpdate or whatever you use to do it.
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, " You are not Leader !");
			}
		}
		return 1;
	}
That's an exemple. Of course, I wrote Player[para1][Faction] but I don't know if you use that in your GM
Same thing for Player[para1][Rank].
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)