Setworld/Proxdetector bug
#4

Here is /world

pawn Код:
LEANCMD:(world)
{
     new
         world,
         string[126];
     
     if(sscanf(params, "i", world)) return SendClientMessage(playerid, 0xF97804FF, "USAGE: /world [WorldID]");
     if (IsPlayerInAnyVehicle(playerid))
     {
         format(string, sizeof(string), "You cant use this while being in a vehicle.");
     }
     else
     {
         SetPlayerVirtualWorld(playerid, world);
         format(string, sizeof(string), "Your virtual world have been set to %i",world);
     }
     SendClientMessage(playerid, COLOR_LIGHTRED, string);
     return 1;
}

And /setworld for admins

pawn Код:
LEANCMD:(setworld)
{
    new
        world,
        id,
        string[126];
       
    if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_LIGHTRED, "ACCESS DENIED");
    if(sscanf(params, "ui", id, world)) return SCM(playerid, COLOR_LIGHTRED, "USAGE: /setworld [PoN/ID] [WorldID]");
    if(IsPlayerInAnyVehicle(id))
    {
        RemovePlayerFromVehicle(id);
        SetPlayerVirtualWorld(id, world);
        format(string, sizeof(string), "Your world have been set to %i by Admin %s", world, GetName(playerid));
        SendClientMessage(id, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "You have set %s's virtual world to %i", GetTName(id), world);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
    }
    else
    {
        SetPlayerVirtualWorld(id, world);
        format(string, sizeof(string), "Your world have been set to %i by Admin %s", world, GetName(playerid));
        SendClientMessage(id, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "You have set %s's virtual world to %i", GetTName(id), world);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
    }

    return 1;
}
And onplayertext

pawn Код:
if (realchat && IsSpecing[playerid] == 0)
    {
        new sendername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        sendername[strfind(sendername,"_")] = ' ';
        format(string, sizeof(string), "%s says: %s", sendername, text);
        ProxDetector(20.0, playerid, string ,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE3,COLOR_FADE3);
        format(string,sizeof(string),"[%d-%d-%d] %s says: %s ",GetDay(),GetMonth(),GetYear(),sendername, text);
        Log("/logs/Emotes.txt",string);
        return 0;
    }
    return 1;
}
Reply


Messages In This Thread
Setworld/Proxdetector bug - by lean1337 - 13.04.2013, 16:14
Re: Setworld/Proxdetector bug - by IstuntmanI - 13.04.2013, 16:16
Re: Setworld/Proxdetector bug - by Shoulen - 13.04.2013, 16:18
Re: Setworld/Proxdetector bug - by lean1337 - 13.04.2013, 16:19
Re: Setworld/Proxdetector bug - by Mattakil - 13.04.2013, 17:00
Re: Setworld/Proxdetector bug - by lean1337 - 13.04.2013, 17:05

Forum Jump:


Users browsing this thread: 2 Guest(s)