16.06.2011, 19:56
pawn Код:
command(movecoords, playerid, params[])
{
new coords[128];
if( sscanf( params, "z", coords) )
{
if( PlayerInfo[playerid][Admin] >= 4 )
{
SendClientMessage( playerid, COLOUR_ORANGE, "Hint: /movecoords (object)" );
SendClientMessage( playerid, COLOUR_WHITE, "Fish Location >< Fish Location 2 >< Fish Location 3" );
}
}
else
{
if( PlayerInfo[playerid][Admin] >= 4 )
{
if(strcmp(coords, "Fish Location", true) == 0 )
{
GetPlayerPos( playerid, Fishx, Fishy, Fishz);
dini_FloatSet( "locations.ini", "Fishx", Fishx);
dini_FloatSet( "locations.ini", "Fishy", Fishy);
dini_FloatSet( "locations.ini", "Fishz", Fishz);
SendClientMessage( playerid, PLAYER, "Fish location moved!" );
}
else if(strcmp(coords, "Fish Location 2", true) == 0 )
{
GetPlayerPos( playerid, Fish2x, Fish2y, Fish2z);
dini_FloatSet( "locations.ini", "Fish2x", Fish2x);
dini_FloatSet( "locations.ini", "Fish2y", Fish2y);
dini_FloatSet( "locations.ini", "Fish2z", Fish2z);
SendClientMessage( playerid, PLAYER, "Fish location 2 moved!" );
}
else if(strcmp(coords, "Fish Location 3", true) == 0 )
{
GetPlayerPos( playerid, Fish3x, Fish3y, Fish3z);
dini_FloatSet( "locations.ini", "Fish3x", Fish3x);
dini_FloatSet( "locations.ini", "Fish3y", Fish3y);
dini_FloatSet( "locations.ini", "Fish3z", Fish3z);
SendClientMessage( playerid, PLAYER, "Fish location 3 moved!" );
}
}
}
return 1;
}