Gyorsan összedobtam.
Kód:
// DM script...
// 2009.
#include <a_samp>
new pName[MAX_PLAYER_NAME];//deklaráljuk
new string[128];
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GREEN 0x33AA33AA
main()
{
print(\"\\n----------------------------------\");
print(\" DM script by Walkout\\n\");
print(\" \\n\");
print(\"----------------------------------\\n\");
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/lvdm\", true) == 0) //parancs
{
SetPlayerPos(playerid,3370.7754,720.5188,17.8358); //teleport
GetPlayerName(playerid, pName, sizeof(pName)); // név
format(string, sizeof(string), \"%s játékos belépet a DM arénába. (/lvdm)\", pName); //belépett
SendClientMessageToAll(COLOR_YELLOW, string);
GivePlayerWeapon(playerid, 31, 500);//fegyver
GivePlayerWeapon(playerid, 34, 150);
GivePlayerWeapon(playerid, 29, 730);
GivePlayerWeapon(playerid, 27, 250);
SetPlayerArmour(playerid, 100);//páncél
SetPlayerHealth(playerid, 100);//élet
return 1;
}
if(strcmp(cmdtext, \"/exit-lvdm\", true ) == 0) //kilépés parancs
{
format(string, sizeof(string), \"%s kilépett a DM arénából.(/exit-lvdm)\", pName); //mindenkinek jelzi
SendClientMessageToAll(COLOR_GREEN, string);
SetPlayerPos(playerid,2149.8228,945.2534,10.7237);//iderakja
return 1;
}
return 0;
}