Can i make this?
#1

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

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;
}
Reply
#3

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!
Reply
#4

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

I can't find a solution
Reply
#6

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 );
}
Reply
#7

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
Reply
#8

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 );
}
Reply
#9

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
Reply
#10

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??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)