Property Doesn't Exist - When Clearly It Does? -
Vincent_Johnson - 16.08.2012
Ok, so i have this problem (refer to screenshot below)
http://s1191.photobucket.com/albums/...=sa-mp-058.png
Problem is, i want to remove that message, it spams too much, but i can't find it in the script at all. I'm using the RX:RP / Vortex Roleplay script created by Calgon way back. If anyones familiar with it, and knows how to remove that message, i really need to know. Also i have 2 other problems. My /kick and /ban cmds, are scripted as admin cmds, but they're reading as rcon ones. Here's the scripting for em. I don't see a problem with them, so i don't understand why they only work when in the rcon.
/kick
Код:
command(kick, playerid, params[])
{
new id, reason[128], string[ 128 ];
if( sscanf( params, "us", id, reason) )
{
if( Player[playerid][AdminLevel] >= 1 )
{
SendClientMessage( playerid, WHITE, "SYNTAX: /kick [playerid] [reason]" );
}
}
else
{
if( Player[playerid][AdminLevel] >= 1)
{
if(IsPlayerConnected(id) )
{
if( Player[id][AdminLevel] > Player[playerid][AdminLevel])
{
SendClientMessage( playerid, WHITE, "You do not have the authority to do that (higher rank)." );
return 1;
}
if( Player[id][AdminLevel] < 1)
{
Player[playerid][AdminActions]++;
SendClientMessage( playerid, WHITE, "You have earned an admin action!" );
}
format( string, sizeof( string ), "Kick: %s has been kicked by %s, reason: %s", GetName(id), Player[playerid][AdminName], reason);
SendClientMessageToAll(LIGHTRED, string);
AdminActionsLog( string );
format( string, sizeof( string ), "You have been kicked from the server for %s", reason);
SendClientMessage(id, WHITE, string);
Kick(id);
}
else
{
SendClientMessage( playerid, WHITE, "That player is not connected." );
return 1;
}
}
}
return 1;
}
/ban
Код:
command(ban, playerid, params[])
{
new id, reason[128], string[ 128 ], ServerURL[128];
if( sscanf( params, "uz", id, reason ) )
{
if( Player[playerid][AdminLevel] >= 2 )
{
SendClientMessage( playerid, WHITE, "SYNTAX: /ban [playerid] [reason]" );
}
}
else
{
if( Player[playerid][AdminLevel] >= 2 )
{
if( IsPlayerConnectedEx( id ) )
{
if( Player[id][AdminLevel] >= Player[playerid][AdminLevel] )
{
SendClientMessage( playerid, WHITE, "You do not have the authority to do that (higher rank, or the same)." );
}
else
{
if( strlen( reason ) >= 1 )
{
new hour, minute, second, day, year, month;
gettime( hour, minute, second );
getdate( year, month, day );
new IP[21];
GetPlayerIp( id, IP, sizeof( IP ) );
format( string, sizeof( string ), "%d/%d/%d | %d:%d | %s | %s | %s | %s", day, month, year, hour, minute, IP, GetName( id ), reason, Player[playerid][AdminName] );
BanLog( string );
if( Player[id][AdminLevel] < 1 )
{
Player[playerid][AdminActions]++;
SendClientMessage( playerid, WHITE, "You have earned an admin action!" );
}
GetServerVarAsString( "weburl", ServerURL, sizeof( ServerURL ) );
format( string, sizeof( string ), "Ban: %s has been banned by %s, reason: %s", GetName( id ), Player[playerid][AdminName], reason );
SendClientMessageToAll( LIGHTRED, string );
AdminActionsLog( string );
format( string, sizeof( string ), "You have been banned for %s. If you wish to appeal your ban, go to %s.", reason, ServerURL );
SendClientMessage( id, GREY, string );
Player[id][Banned] = 1;
Ban( id );
}
else
{
SendClientMessage( playerid, WHITE, "SYNTAX: /ban [playerid] [reason]" );
}
}
}
else
{
SendClientMessage( playerid, WHITE, "That player is not connected or isn't logged in." );
return 1;
}
}
}
return 1;
}