[HELP/AYUDA]OnPlayerClickPlayer
#1

Hola, si alguien me puede ayudar a hacer que aparesca esta informacion al dar doble click al player:

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
        new ID,string[256],string2[256],name[60];
        if(sscanf(params, "i", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /i [id]");
        else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
     else
        {
         HideDraw(playerid);
         GetPlayerName(clickedpayerid, name, 60);
         new carid = GetPlayerVehicleID(ID);
         TextDrawShowForPlayer(playerid,text44);
         TextDrawShowForPlayer(playerid,text45);
         TextDrawShowForPlayer(playerid,PCBOX);
         if(!IsPlayerInAnyVehicle(ID))
         {
         format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~none", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID));
         }else
         if(IsPlayerInAnyVehicle(ID))
         {
         format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~%s", name, ID, ReturnPlayerZone(ID),GetPlayerMoney(ID),GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400]);
         }
         TextDrawSetString(text44,string);
         format(string2,256,"~n~~n~~n~~n~~n~~n~~n~~w~Type ~r~~h~LMB ~w~For Hide Thes~n~~w~Boxes!");
         TextDrawSetString(text45,string2);
        }
        return 1;
}
es un comando pero espero que puedan ayudarme.
Reply
#2

cambia todos los "ID" por clickedplayerid, saca new ID y
pawn Код:
if(sscanf(params, "i", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /i [id]");
no va
Reply
#3

Aca abajo de lo correji:

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new string[256],string2[256],name[60];
    if(!IsPlayerConnected(clickedplayerid)) SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
    else
    {
        HideDraw(playerid);
        GetPlayerName(clickedpayerid, name, 60);
        new carid = GetPlayerVehicleID(clickedid);
        TextDrawShowForPlayer(playerid,text44);
        TextDrawShowForPlayer(playerid,text45);
        TextDrawShowForPlayer(playerid,PCBOX);
        if(!IsPlayerInAnyVehicle(clickedplayerid))
        {
            format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~none", name, clickedplayerid, ReturnPlayerZone(clickedplayerid),GetPlayerMoney(clickedplayerid),GetPlayerWantedLevel(clickedplayerid));
        }else
        {
            format(string, 256, "~y~Player Info: ~r~~h~%s[%d]~n~~n~~g~Location:~w~%s~n~~g~Money:~w~%d~n~~g~Wanted Level:~w~%d~n~~g~Drive:~w~%s", name, ID, ReturnPlayerZone(clikedplayerid),GetPlayerMoney(clikedplayerid),GetPlayerWantedLevel(clikedplayerid),VehicleNames[GetVehicleModel(carid)-400]);
         }
         TextDrawSetString(text44,string);
         format(string2,256,"~n~~n~~n~~n~~n~~n~~n~~w~Type ~r~~h~LMB ~w~For Hide Thes~n~~w~Boxes!");
         TextDrawSetString(text45,string2);
        }
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)