Добавил команду /setname
This commit is contained in:
@@ -8819,7 +8819,7 @@ public OnPlayerCommandText(playerid, cmdtext[])
|
||||
}
|
||||
if(!strlen(tmp))
|
||||
{
|
||||
SendClientMessageRus(playerid, COLOR_GRAD1, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: /changename [newname]");
|
||||
SendClientMessageRus(playerid, COLOR_GRAD1, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: /changenick [newname]");
|
||||
return 1;
|
||||
}
|
||||
format(string, sizeof(string), "%s.cer", tmp);
|
||||
@@ -15687,6 +15687,64 @@ public OnPlayerCommandText(playerid, cmdtext[])
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if(strcmp(cmd, "/setname", true) == 0)
|
||||
{
|
||||
if(PlayerInfo[playerid][pAdmin] >= 3)
|
||||
{
|
||||
new nicktmp[19];
|
||||
new string2[256];
|
||||
new string3[256];
|
||||
tmp = strtok(cmdtext, idx);
|
||||
if(!strlen(tmp))
|
||||
{
|
||||
SendClientMessage(playerid, COLOR_GRAD2, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: /setname [<5B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][<5B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>]");
|
||||
return 1;
|
||||
}
|
||||
giveplayerid = strval(tmp);
|
||||
format(nicktmp, sizeof(nicktmp), "%s", strtok(cmdtext, idx));
|
||||
if(!strlen(nicktmp))
|
||||
{
|
||||
SendClientMessage(playerid, COLOR_GRAD1, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: /setname [<5B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>][<5B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>]");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strlen(nicktmp) < 3)
|
||||
{
|
||||
SendClientMessage(playerid, COLOR_GRAD1, "C<><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>!");
|
||||
return 1;
|
||||
}
|
||||
else if(strlen(nicktmp) > 19)
|
||||
{
|
||||
SendClientMessage(playerid, COLOR_GRAD1, "C<><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>!");
|
||||
return 1;
|
||||
}
|
||||
format(string, sizeof(string), "%s.ini", nicktmp);
|
||||
if(fexist(string))
|
||||
{
|
||||
SendClientMessage(playerid, COLOR_GRAD1, "<22><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(IsPlayerConnected(giveplayerid))
|
||||
{
|
||||
format(string, sizeof(string), "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>: %s", nicktmp);
|
||||
SendClientMessage(giveplayerid, 0xF6F6F6AA, string);
|
||||
GetPlayerName(giveplayerid, playername, sizeof(playername));
|
||||
format(string3, sizeof(string3), "%s <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> %s", playername, nicktmp);
|
||||
SendClientMessageToAll(0xF6F6F6AA, string3);
|
||||
format(string2, sizeof(string2), "%s.ini", playername);
|
||||
fremove(string2);
|
||||
SetPlayerName(giveplayerid, nicktmp);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
//----------------------------------[SKYDIVE]------------------------------------------------
|
||||
if(strcmp(cmd, "/skydive", true) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user