17.06.2016, 06:32
Hello,
I just want to know what is wrong with this :
and please if u can make it with zcmd.inc
like:
And my 2nd problem is how to use %s For GetName(); and SCM instead of SendCilentMessage();
I just want to know what is wrong with this :
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/sdm1", cmdtext, true, 10) == 0)
{
new Random = random(sizeof(SDM1));
SetPlayerPos(playerid, SDM1[Random][0], SDM1[Random][1], SDM1[Random][2]);
SetPlayerFacingAngle(playerid, SDM1[Random][3]);
GameTextForPlayer(playerid,"~w~Welcome ~r~To ~g~Sniper ~p~DM ~y~Area-1.",3,5);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 20);
SetPlayerArmour(playerid, 0);
SetPlayerSkin(playerid,102);
GivePlayerWeapon(playerid, 34, 99999);
GivePlayerWeapon(playerid, 46, 1);
}
return 1;
if (strcmp("/cbdm1", cmdtext, true, 10) == 0)
{
new Random = random(sizeof(SDM1));
SetPlayerPos(playerid, CBDM1[Random][0], CBDM1[Random][1], CBDM1[Random][2]);
SetPlayerFacingAngle(playerid, CBDM1[Random][3]);
GameTextForPlayer(playerid,"~w~Welcome ~r~To ~g~C-Bug ~p~DM ~y~Area-1.",3,5);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid,102);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 25, 99999);
GivePlayerWeapon(playerid, 34, 99999);
}
return 1;
}
like:
PHP Code:
CMD:sdm1(playerid, params[])
CMD:sbdm1(playerid, params[])