enum PlayerVariables { deltaOwner[MAX_PLAYER_NAME], }; new PlayerVar[MAX_PLAYERS][PlayerVariables];
SendClientMessage(playerid, COLOR_YELLOW,"Delta Owner : %d",PlayerVar[playerid][deltaOwner);
For SendClientMessage:-
pawn Код:
|
new Owner[100];
format(Owner,sizeof(Owner)," Delta Owner : %d",PlayerVar[playerid][deltaOwner);
SendClientMessage(playerid,-1,Owner);
enum eg
{
Downer[24],
}
new Examples[MAX_PLAYERS][eg];
CMD:changedowner(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "[Change]Delta Owner", "Please type in below your new delta's owner.", "Change", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response) return SendClientMessage(playerid, -1, "You have cancelled changing your delta's owner."); //If player clicks the second button, i.e: 'Cancel'.
else if(response) //If first button, i.e: 'Change'
{
new string[128];
format(string, sizeof(string), "You have changed your Delta's owner to %s", inputtext);
format(Examples[playerid][Downer], 24, "%s", inputtext); //Sets the var's value to the inputtext.
SendClientMessage(playerid, -1, string);
}
}
return 1;
}