[Duda simple] Formato Nombre_Apellido
#5

pawn Код:
// -- FUNCION --
stock Nombre(playerid) {
    new string[24], str[24];
    GetPlayerName(playerid,string,24);
    strmid(str,string,0,strlen(string),24);
    for(new i = 0; i < MAX_PLAYER_NAME; i++) {
        if (str[i] == '_') str[i] = '_'; }
    return str;
}
// -- FUNCION --
pawn Код:
CMD:y(playerid, params[]) {
    new str[128], Float:pos[3];
    if(isnull(params)) return SendClientMessage(playerid, -1, "Porfavor, use /y (Texto). Ejemplo: /y agarra una piedra del suelo.");
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    format(str, sizeof(str), " * %s %s", Nombre(playerid), params);
    for(new player; player <GetMaxPlayers(); player++) {
        if(!IsPlayerConnected(player)) continue;
        if(IsPlayerInRangeOfPoint(player, 11.0, pos[0], pos[1], pos[2])) {
            SendClientMessage(player, 0x00FFB7FF, str);
        }
    } return true;
}
Reply


Messages In This Thread
[Duda] Poner espacio en un comando - by Kryzis - 28.08.2013, 03:27
Respuesta: [Duda simple] Formato Nombre_Apellido - by JustBored - 28.08.2013, 03:37
Respuesta: [Duda simple] Formato Nombre_Apellido - by Swedky - 28.08.2013, 03:38
Respuesta: [Duda simple] Formato Nombre_Apellido - by Kryzis - 28.08.2013, 03:47
Respuesta: [Duda simple] Formato Nombre_Apellido - by OTACON - 28.08.2013, 13:07
Respuesta: [Duda simple] Formato Nombre_Apellido - by Kryzis - 30.08.2013, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)