[Pedido] Converter zcmd pra strcmp
#2

pawn Код:
#include <a_samp>

new OldUsername[MAX_PLAYER_NAME][MAX_PLAYERS];
new bool:Masked[MAX_PLAYERS] = false;


public OnPlayerText(playerid, text[])
{
    if(Masked[playerid])
    {
        new string[128];
        format(string, sizeof(string), "Stranger says, \"%s\"", text);
        SendClientMessage(playerid, -1, string);
        return 0;
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[]){
{
    if(!strcmp(cmdtext, "/mask")){
   
        if(isStranged[playerid] == 0)
        {
            new randomID = random(200);
            new string[35];
            isStranged[playerid] = true;
            GetPlayerName(playerid, string, sizeof(string));
            strmid(OldUsername[playerid], string, 0, strlen(string), 64);
            format(string,sizeof(string), "Stranger", randomID);
            SetPlayerName(playerid, string);
            SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
            SendClientMessage(playerid, -1, "You have put on a mask! (/mask to romove it)");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                ShowPlayerNameTagForPlayer(i, playerid, 0);
            }
        }
        else
        {
            SetPlayerName(playerid, OldUsername[playerid]);
            isStranged[playerid] = false;
            SendClientMessage(playerid, -1, "You have removed your mask!");
            if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                ShowPlayerNameTagForPlayer(i, playerid, 1);
            }
        }
       
        return true;
    }
    return 1;
}
Reply


Messages In This Thread
Converter zcmd pra strcmp - by TmZ - 08.08.2014, 03:48
Re: Converter zcmd pra strcmp - by zSuYaNw - 08.08.2014, 03:52
Re: Converter zcmd pra strcmp - by TmZ - 08.08.2014, 03:53
Re: Converter zcmd pra strcmp - by TmZ - 08.08.2014, 03:56
Re: Converter zcmd pra strcmp - by StreetGT - 08.08.2014, 03:57
Re: Converter zcmd pra strcmp - by zSuYaNw - 08.08.2014, 03:57
Re: Converter zcmd pra strcmp - by TmZ - 08.08.2014, 04:00
Re: Converter zcmd pra strcmp - by zSuYaNw - 08.08.2014, 04:04
Re: Converter zcmd pra strcmp - by TmZ - 08.08.2014, 04:07
Re: Converter zcmd pra strcmp - by Schocc - 08.08.2014, 04:33

Forum Jump:


Users browsing this thread: 1 Guest(s)