command isint working - 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)
+--- Thread: command isint working (
/showthread.php?tid=404370)
command isint working -
ancezas - 02.01.2013
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/kill", true))
{
SetPlayerHealth(playerid, 0);
return true;
}
if(!strcmp(cmdtext, "/kmisija", true))
{
if( zInfo[ playerid ][ Admin ] < 1) return 0;
new msg[ 180 ];
format(msg, 180, "[ 1 ] Armijos Maљina\n[ 2 ] Katafalko vogimas\n[ 3 ] Љviturys\n[ 4 ] Dviračių lenktynės\n[ 5 ] Malunsparnis\n[ 6 ] Piktos Babces\n[ 7 ] Parkour\n[ 8 ] GunGame\n[ 9 ] Motoroleriai");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"{9900cc}Misijos",msg,"Keisti","Iseiti");
return true;
}
return 0;
}
/kill is working but /kmisija not, even i'm admin
Re: command isint working -
aslan890 - 02.01.2013
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
return 0;
}
Re: command isint working -
aslan890 - 02.01.2013
For kill command you can use this one
Код:
if(strcmp(cmdtext, "/kill", true) == 0)
{
dmyasagi[playerid] = 0;
SetPlayerHealth(playerid, 0.00);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
GivePlayerMoney(playerid, -1000);
GameTextForPlayer(playerid,"~n~~n~~n~~r~Y~g~O~y~b~U~D~p~E~p~A~r~D~w~!~n~-1000$",2500,5);
SetPlayerWorldBounds(playerid,20000.0000,-20000.0000,20000.0000,-20000.0000);
TogglePlayerControllable(playerid, true);
SetCameraBehindPlayer(playerid);
return 1;
}
OR this one
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/kill", true) == 0)
{
SetPlayerHealth(playerid, 0.00);
return true;
}
if(!strcmp(cmdtext, "/kmisija", true))
{
if( zInfo[ playerid ][ Admin ] < 1) return 0;
new msg[ 180 ];
format(msg, 180, "[1] Armijos Maљina\n[2] Katafalko vogimas\n[3] Љviturys\n[4] Dviraciu lenktynes\n[5] Malunsparnis\n[6] Piktos Babces\n[7] Parkour\n[8] GunGame\n[9] Motoroleriai");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"{9900cc}Misijos",msg,"Keisti","Iseiti");
return true;
}
return 0;
}