dont work
#1

Hello i crate one command /id but when i make it to other player say just my name and when make other player tell just your self how to make it for can see and other player?

pawn Код:
dcmd_id(playerid, params[])
{
    new pid,PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
    if(sscanf(params, "u", pid)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /id <part of name>");
    if(!IsPlayerConnected(pid)) return SendClientMessage(playerid,COLOR_RED, "Player not found.");
    SendClientMessage(playerid, 0xE89B5BBB, "Players found:");
    format(str, sizeof(str), "> %s (ID:%d) ",PlayerName ,pid );
    SendClientMessage(playerid, COLOR_WHITE, str);
    return 1;
}
Thank you.
Reply
#2

anyone?
Reply
#3

1. I don't know what the fuck you just said on your post.
2. Stop bumping your fucking thread
Reply
#4

pawn Код:
dcmd_id(playerid, params[])
{
    new pid,PlayerName[MAX_PLAYERS][MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
    if(sscanf(params, "u", pid)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /id <part of name>");
    if(!IsPlayerConnected(pid)) return SendClientMessage(playerid,COLOR_RED, "Player not found.");
    SendClientMessage(playerid, 0xE89B5BBB, "Players found:");
    format(str, sizeof(str), "> %s (ID:%i) ",PlayerName[pid] ,pid );
    SendClientMessage(playerid, COLOR_WHITE, str);
    return 1;
}
Try this.
Reply
#5

Line GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME); error
Код:
error 048: array dimensions do not match
Reply
#6

Just change PlayerName to PlayerName[playerid]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)