15.05.2014, 09:52
(
Last edited by Spartaaaaa; 15/05/2014 at 10:23 AM.
)
pawn Code:
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
OnPlayerConnect(i); //Error line
}
}
//--------------------------------------------------------------------------
for(new i = 1; i < MAX_REPORTS; i++)
{
Reports[i] = "No Reports Found";
}
//--------------------------------------------------------------------------
pawn Code:
CMD:changename(playerid, params[])
{
if(AccInfo[playerid][pVip] > 2)
{
new NpName[MAX_PLAYER_NAME], stringf[128];
//----------------------------------------------------------------------
if(sscanf(params, "s[24]", NpName)) return
SendClientMessage(playerid, orange, "Usage: /cmyname [New Nickname]");
//----------------------------------------------------------------------
else
{
SetPlayerName(playerid, NpName);
format(stringf, sizeof(stringf), "You have Successfully Changed your nickname to {11FF00}%s!", NpName);
SendClientMessage(playerid, orange, stringf);
return OnPlayerConnect(playerid); //Error line
}
}
else return SendClientMessage(playerid, red, "ERROR: You must be VIP Level 2 to use this command!");
pawn Code:
CMD:setname(playerid,params[])
{
if(AccInfo[playerid][Level] >= 4 || IsPlayerAdmin(playerid))
{
new player1, tmp2[MAX_PLAYER_NAME], string[128];
//----------------------------------------------------------------------
if(sscanf(params, "us[24]", player1, tmp2)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /setname [PlayerID] [NewName]") &&
SendClientMessage(playerid, orange, "Function: Will set Name of specified player!");
//----------------------------------------------------------------------
if(strlen(tmp2) < 3 || strlen(tmp2) > MAX_PLAYER_NAME) return
SendClientMessage(playerid,red,"ERROR: Incorrect Name Length");
//----------------------------------------------------------------------
if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return
SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
//----------------------------------------------------------------------
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
SendCommandToAdmins(playerid,"SetName");
format(string, sizeof(string), "|- You have set \"%s's\" Name to \"%s\" -|", pName(player1), tmp2);
SendClientMessage(playerid,BlueMsg,string);
if(player1 != playerid)
{
format(string,sizeof(string),"|- Administrator \"%s\" has set your Name to \"%s\" -|", pName(playerid), tmp2);
SendClientMessage(player1,blue,string);
}
SetPlayerName(player1, tmp2);
return OnPlayerConnect(player1); //Error line
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}