Script small question
#6

It's also very simple... If you are using pInfo's you can do it like this.
PHP код:
if (strcmp("/buymask"cmdtexttrue) == 0)
{
    if(
IsPlayerConnected(playerid))
    {
        
SetPlayerMoney(playerid, -45);
        
PlayerInfo[playerid][pHasMask] = 1;
        
SendClientMessage(playeridCOLOR_RED"You bought a mask! [/maskoff or /mask]");
    }

And Mask code should look like this
PHP код:
if (strcmp("/mask"cmdtexttrue) == 0)
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
         {
             if(
PlayerInfo[playerid][pHasMask] == 1)
             {
                
ShowPlayerNameTagForPlayer(iplayerid0);
                
GameTextForPlayer(playerid"~W~You have put mask ~g~ on"50005);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"You don't have mask!");
                 }
    }
    return 
1;

Reply


Messages In This Thread
Script small question - by Scriptissue - 27.09.2010, 19:14
Re: Script small question - by sekol - 27.09.2010, 19:17
Re: Script small question - by Scriptissue - 27.09.2010, 19:20
Re: Script small question - by sekol - 27.09.2010, 19:25
Re: Script small question - by Scriptissue - 27.09.2010, 19:35
Re: Script small question - by sekol - 28.09.2010, 10:36
Re: Script small question - by Scriptissue - 28.09.2010, 11:28
Re: Script small question - by Mike_Peterson - 28.09.2010, 11:44
Re: Script small question - by Scriptissue - 28.09.2010, 13:09
Re: Script small question - by Mike_Peterson - 28.09.2010, 13:35

Forum Jump:


Users browsing this thread: 3 Guest(s)