SA-MP Forums Archive
Can i make this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can i make this? (/showthread.php?tid=249754)



Can i make this? - NitoPSG - 20.04.2011

Can i make a command that when someone type /givebeer [player id] will give special action beer to the player?


Re: Can i make this? - [ADC]Aldi96 - 20.04.2011

u can use command : this code
Код:
COMMAND:shop(playerid, params[])
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{000FFF}What you want?", "{33CC99}Sprunk ($2)\n{FF0000}Beer ($5)\n{993300}Wine ($8)\n{66FF00}Health($3000)", "Buy", "Cancel");
    return 1;
}



Re: Can i make this? - NitoPSG - 20.04.2011

Quote:
Originally Posted by [ADC]Aldi96
Посмотреть сообщение
u can use command : this code
Код:
COMMAND:shop(playerid, params[])
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{000FFF}What you want?", "{33CC99}Sprunk ($2)\n{FF0000}Beer ($5)\n{993300}Wine ($8)\n{66FF00}Health($3000)", "Buy", "Cancel");
    return 1;
}
i didn't mean this, i mean i am a character and what to give a beer to my friend, so i type /givebeer [friends id] and then i beer will appear to my friends hand!


Re: Can i make this? - [ADC]Aldi96 - 20.04.2011

aa look in ****** search men and see in the samp post i dont know this scripts!!!


Re: Can i make this? - NitoPSG - 20.04.2011

I can't find a solution


Re: Can i make this? - Mean - 20.04.2011

ZCMD:
pawn Код:
CMD:givebeer( playerid, params[ ] )
{
    new id = strval( params );
    if( isnull( id ) ) return SendClientMessage( playerid, 0xAAAAAA, "Usage: /givebeer [ID]! " ) ;
    if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xAAAAAA, "Invalid ID! " );
    return SetPlayerSpecialAction( id, SPECIAL_ACTION_DRINK_BEER );
}



Re: Can i make this? - NitoPSG - 20.04.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
ZCMD:
pawn Код:
CMD:givebeer( playerid, params[ ] )
{
    new id = strval( params );
    if( isnull( id ) ) return SendClientMessage( playerid, 0xAAAAAA, "Usage: /givebeer [ID]! " ) ;
    if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xAAAAAA, "Invalid ID! " );
    return SetPlayerSpecialAction( id, SPECIAL_ACTION_DRINK_BEER );
}
i don't use ZCMD


Re: Can i make this? - Mean - 20.04.2011

pawn Код:
if( !strcmp( cmdtext, "/givebeer", true, 9 ) )
{
    new id = strval( cmdtext[ 10 ] );
    if( !cmdtext[ 10 ] ) return SendClientMessage( playerid, 0xAAAAAA, "Usage: /givebeer [ID]! " ) ;
    if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xAAAAAA, "Invalid ID! " );
    return SetPlayerSpecialAction( id, SPECIAL_ACTION_DRINK_BEER );
}



Re: Can i make this? - NitoPSG - 20.04.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
pawn Код:
if( !strcmp( cmdtext, "/givebeer", true, 9 ) )
{
    new id = strval( cmdtext[ 10 ] );
    if( !cmdtext[ 10 ] ) return SendClientMessage( playerid, 0xAAAAAA, "Usage: /givebeer [ID]! " ) ;
    if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xAAAAAA, "Invalid ID! " );
    return SetPlayerSpecialAction( id, SPECIAL_ACTION_DRINK_BEER );
}
doesn't work


Re: Can i make this? - NitoPSG - 20.04.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
pawn Код:
if( !strcmp( cmdtext, "/givebeer", true, 9 ) )
{
    new id = strval( cmdtext[ 10 ] );
    if( !cmdtext[ 10 ] ) return SendClientMessage( playerid, 0xAAAAAA, "Usage: /givebeer [ID]! " ) ;
    if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xAAAAAA, "Invalid ID! " );
    return SetPlayerSpecialAction( id, SPECIAL_ACTION_DRINK_BEER );
}
hey can you help me to learn how to use ZCMD? i need to install something??