I tried to make a command like this: -
Jimmi - 29.06.2015
I tried to make a command like this:
http://i.imgur.com/rSuTiup.png
but I got stuck. Can someone help me?
Код:
CMD:testtw(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1 ||PlayerInfo[playerid][pTrial] >= 3)
{
new jucator, numejucator[32];
if(sscanf(params, "u", jucator)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /testtw [PlayerID/PartOfName]");
GetPlayerName(jucator, numejucator, sizeof(numejucator));
Re: I tried to make a command like this: -
darkowner - 29.06.2015
Try this
Код HTML:
CMD:testtw(playerid, params[])
{
{
if(PlayerInfo[playerid][pAdmin] >= 1 ||PlayerInfo[playerid][pTrial] >= 3)
{
strcat(eString, "{FF0000}Ce vrei tu\n\
{00FF00}Ce vrei tu\n\
\n\
//----------------------------------------------------------------------
return ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "Titlu dialog", eString, "Okay", "");
}
Re: I tried to make a command like this: -
Neos07 - 29.06.2015
CMD:testtw(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1 ||PlayerInfo[playerid][pTrial] >= 3)
{
new jucator, numejucator[32];
if(sscanf(params, "u", jucator)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /testtw [PlayerID/PartOfName]");
GetPlayerName(jucator, numejucator, sizeof(numejucator));
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "TEST TEAMVIEWER", "you have been bla bla.....", "Accept", "Refuse");
return 1;
}
and now go to OnDialogResponse and do if dialogid == 9999 etc...
Re : I tried to make a command like this: -
Terrorizt - 29.06.2015
At the top of your script under includes
Код:
#define DIALOG_TESTTV 100
The command:
Код:
CMD:testtv(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pTrial] < 3) return SendClientMessage(playerid, -1, "You are not allowed to use this command!");
if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "{00FF00}Folosire:{FFFFFF} /testtv [PlayerID]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "Error: Player not found");
ShowPlayerDialog(target, DIALOG_TESTTV, DIALOG_STYLE_MSGBOX,"Test Teamviewer","You have been supposed to a Team Viewer test by an admin\nIf you accept, you will be teleported on Chillad.\nIf you refuse, you will be permanently banned.\nWhat's a Team Viewer test? It's a control in your PC for hacks using a program.","Accept","Refuse");
}
On Dialog Response: make your own ban function and TPs and ...
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_TESTTV)
{
if(!response)
{
// ban function
}
if(response)
{
// Tp to chilliad and ..
}
}
return 1;
}
P.S.: If you get any error don't hesitate to contact me over PM or just reply.
Re: I tried to make a command like this: -
Jimmi - 29.06.2015
error
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27196) : error 017: undefined symbol "target"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27197) : error 017: undefined symbol "target"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(2719

: error 017: undefined symbol "target"
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27199) : warning 209: function "cmd_testtv" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re : I tried to make a command like this: -
Terrorizt - 29.06.2015
Код:
CMD:testtv(playerid, params[])
{
new target;
if(PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pTrial] < 3) return SendClientMessage(playerid, -1, "You are not allowed to use this command!");
if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "{00FF00}Folosire:{FFFFFF} /testtv [PlayerID]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "Error: Player not found");
ShowPlayerDialog(target, DIALOG_TESTTV, DIALOG_STYLE_MSGBOX,"Test Teamviewer","You have been supposed to a Team Viewer test by an admin\nIf you accept, you will be teleported on Chillad.\nIf you refuse, you will be permanently banned.\nWhat's a Team Viewer test? It's a control in your PC for hacks using a program.","Accept","Refuse");
return 1;
}
Try this code. I added "new target;" and "return 1;"
Re: I tried to make a command like this: -
Jimmi - 29.06.2015
Thanks, but I say that I don't have access to this command although I administrator 8
Re : I tried to make a command like this: -
Terrorizt - 29.06.2015
I just gave you an example of it, you can add colors, change texts also put the Max or min pAdmin or pTrial as you wish. It depends on the number of your admin ranks and admin commands restriction.
e.g:
Код:
if(PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pTrial] < 3) return SendClientMessage(playerid, -1, "You are not allowed to use this command!");
Change the values to put minimum Admin level to use this command or min pTrial.
I guess you know these:
Re: I tried to make a command like this: -
Jimmi - 29.06.2015
all the same
Re: I tried to make a command like this: -
Vince - 29.06.2015
I'd rather be banned than letting some unknown person control my PC.