please help...
#1

guys i want when some player will tupe /sellweapons [id] to show dialog on other player who is near him 10.0metters
just show me the way how to start and ill make the dialog with the weapons
Reply
#2

Show the player who types it the Dialog or the one whos close enough?

Heres just a base line of it, as you said you can do the rest.

pawn Код:
COMMAND:sellweapons(playerid, params[]) {
    new userid, Float:x, Float:y, Float:z;
    if (sscanf(params, "i", userid)) return SendClientMessage(playerid, COLOR_RED, "/sellweapons <playerid>");
    GetPlayerPos(userid, x, y, z);
    if (!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid, COLOR_RED, "Not close enough!");
    //Any other checks here..such as team, admin etc...
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Selling Weapons", "Choose a weapon\none\two", "Ok", "Cancel");
    return 1;
}
First it starts a new command called sellweapons.
It assigns some variables to be used, and checks if the input from the command matches. Such as the user id.
Then gets the players pos, and checks if your close enough.
Then Shows the dialog to the one who typed it. (Just change the playerid in the dialog to userid if its the other way around)
Reply
#3

well i think it is simple but ...
btw where i need to put this and tell me what i need other stuff (dialog, ..... ? )
Thanks.
Reply
#4

rafa you are copycatting lsrcr right
well.maybeu shudmake ur own ideas.
ontopic

wiki.sa-mp.com/wiki/ShowPlayerDialog
wiki.sa-mp.com/wiki/GetPlayerPos
wiki.sa-mp.com/wiki/IsPlayerInRangeOfPoint
wiki.sa-mp.com/wiki/OnDialogResponse

and fix it yourself

and please don't make topicsbout the same 4minutes after eachother
Reply
#5

lol copying lsrcr i dont even thing about that omfg O_O

that am asking just to learn how to script...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)