Name Permissions
#1

How can i create special permissions for a particular name ? For e.g

This msg is shown only if a player named "Omer" logs into the server:


>> Server Owner Omer has logged in.

If anyone can help me with this name login example, that would be appreciated.
Reply
#2

PHP код:
//onplayerconnect 
new playeridname[MAX_PLAYER_NAME];
   
GetPlayerName(playeridplayeridnamesizeof(playeridname));
if(
strfind(playeridname,"Omer",false) != 0)
{
 
SendClientMessageToAll(COLOR_YOUWANT,"Server Owner Omer has joined the server");

Reply
#3

Код:
SendClientMessage(playerid, COLOR_YELLOW, "SERVER: You have successfully logged in to the server.");
		new playeridname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playeridname, sizeof(playeridname));
        if(strfind(playeridname,"Omer",false) != 0) return
        format(string, sizeof(string), ">> Omer has logged in.");
	    SendClientMessageToAll(COLOR_ORANGE, string);
The msg dosen't appears!
Reply
#4

Quote:
Originally Posted by OmerKhan
Посмотреть сообщение
Код:
SendClientMessage(playerid, COLOR_YELLOW, "SERVER: You have successfully logged in to the server.");
		new playeridname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playeridname, sizeof(playeridname));
        if(strfind(playeridname,"Omer",false) != 0) return
        format(string, sizeof(string), ">> Omer has logged in.");
	    SendClientMessageToAll(COLOR_ORANGE, string);
The msg dosen't appears!
PHP код:
new playeridname[MAX_PLAYER_NAME];
GetPlayerName(playeridplayeridnamesizeof(playeridname));
if(
strfind(playeridname,"Omer",false) != 0)  SendClientMessageToAll(COLOR_ORANGE">> Omer has logged in."); 
Reply
#5

Isn't working!
Reply
#6

PHP код:
new playeridname[MAX_PLAYER_NAME]; 
GetPlayerName(playeridplayeridnamesizeof(playeridname)); 
if (
strfind(playeridname"Omer"true) != -1){
  
SendClientMessageToAll(COLOR_ORANGE">> Omer has logged in."); 

Reply
#7

Give us your on player connect line
Reply
#8

Working fine sir
Код:
CMD:stats(playerid, params[])
{
	LoginCheck(playerid);
	new target;
	new id;
	if(sscanf(params, "u", target))
	{
  		target = playerid;
		SendClientMessage(playerid, COLOR_RED, "TIP: {FFFFFF}You can also view other players stats by /stats [player id]");
	}

	if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_RED, "ERROR: The specified player is not conected.");


		if(User[playerid][accountAdmin] < User[id][accountAdmin])
		return SendClientMessage(playerid, COLOR_RED, "* You cannot use this command on higher admin.");

		ShowStatistics(playerid);
	return 1;
}
If i do /stats [ANY OTHER ID, NOT MINE], then it will show my stats
Reply
#9

make it
Код:
ShowStatistics(playerid); to ShowStatistics(target);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)