Szerző Téma: Nem mûködnek a parancsok  (Megtekintve 512 alkalommal)

Nem elérhető KrisT

  • 106
    • Profil megtekintése
Nem mûködnek a parancsok
« Dátum: 2013. április 05. - 09:55:10 »
0 Show voters
Nem mûködnek a parancsok, mi lehet a hiba?
 
#include <a_samp>
#include <zcmd>
#include <sscanf>
#define COLOR_LBLUE 0x0ae9f5AA
#define COLOR_DRED 0xc90000AA
#define COLOR_GREEN 0x07d700AA
#define COLOR_FEHER -1
#define COLOR_ORANGERED 0xff2b00AA
new nev[MAX_PLAYER_NAME];
main();
public OnGameModeInit()
{
SetGameModeText(\"Fly City\");
UsePlayerPedAnims();
ShowPlayerMarkers(0);
ShowNameTags(0);
AddPlayerClass(165,1286.8572,-895.7513,42.8753,6.2544,31,5000,27,5000,16,50); // nyomozó 1
AddPlayerClass(110,1269.6843,-860.6953,42.8828,96.9182,31,5000,27,5000,16,50); // Vagos 1
AddStaticVehicle(576,1259.5007,-918.9709,42.3406,99.9902,72,1); // VoDoo
AddStaticVehicle(470,1264.0115,-860.0898,42.8761,188.1846,43,0); // Patriot
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1189.4095,-897.0428,48.0625);
SetPlayerFacingAngle(playerid, 185.2300);
SetPlayerCameraPos(playerid, 1191.4879,-914.2219,53.0836);
SetPlayerCameraLookAt(playerid, 1189.1219,-893.9053,48.0625);
return 1;
}
public OnPlayerConnect(playerid)
{
new string[256];
GetPlayerName(playerid,nev,sizeof(nev));
format(string,sizeof(string),\"[FlyRPG] Üdvözlünk a szerveren %s\",nev);
SendClientMessage(playerid,COLOR_LBLUE,string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid,34,150);
SetPlayerColor(playerid,COLOR_FEHER);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/tele jizzy\", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,-2626.9663,1396.6753,7.1016);
SetPlayerFacingAngle(playerid,181.5330);
return 1;
}
if (strcmp(\"/help\", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_GREEN,\"[FlyRPG] /skinvaltas, /kill, /health, /armour /giveweapon(38-as idjût ne adj, mert kickel a szerver(minigun))\");
SendClientMessage(playerid,COLOR_GREEN,\"[FlyRPG] /fixveh\");
SendClientMessage(playerid,COLOR_GREEN,\"[FlyRPG] A parancsok és listája bõvülni fognak! :)\");
return 1;
}
if (strcmp(\"/fixveh\", cmdtext, true, 10) == 0)
{
    new vid = GetPlayerVehicleID(playerid);
    if (vid) RepairVehicle(vid);
SendClientMessage(playerid,COLOR_LBLUE,\"Kocsi megjavítva!\");
return 1;
}
if (strcmp(\"/armour\", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_LBLUE,\"[FlyRPG] Armorodat sikeresen feltöltötted!\");
SetPlayerArmour(playerid,100);
return 1;
}
if (strcmp(\"/health\", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_LBLUE,\"[FlyRPG] HP-dat sikeresen feltöltötted!\");
SetPlayerHealth(playerid,100);
return 1;
}
if (strcmp(\"/kill\", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_ORANGERED,\"[FlyRPG] Megölted magad!\");
SetPlayerHealth(playerid,0);
return 1;
}
if (strcmp(\"/skinvaltas\", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
new skinid;
if(sscanf(cmdtext,\"i\",skinid)) return SendClientMessage(playerid,COLOR_ORANGERED,\"[FlyRPG] Használata: /skinvaltas [skinID]\");
{
    if(skinid <= 299 && skinid >= 0)
   {
      SetPlayerSkin(playerid,skinid);
      printf(\"[FlyRPG] %s megváltoztatta a skinjét %d -ra/re!\",nev,skinid);
      SendClientMessage(playerid,COLOR_LBLUE,\"[FlyRPG] Sikeresen megváltoztattad a Skinedet!\");
   }
    else SendClientMessage(playerid,COLOR_ORANGERED,\"[FlyRPG] A skin ID-nek 0 és 299 között kell lennie\");
}
}
else SendClientMessage(playerid,COLOR_ORANGERED,\"[FlyRPG] Nem vagy bejelentkezbe\");
return 1;
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
« Utoljára szerkesztve: 2013. április 05. - 17:24:45 írta krist »

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Nem mûködnek a parancsok
« Válasz #1 Dátum: 2013. április 05. - 10:45:29 »
0 Show voters
Mert a mód elején be van írva a #include <zcmd> és te strcmp használsz töröld ki ezt: #include <zcmd>

Nem elérhető KrisT

  • 106
    • Profil megtekintése
Nem mûködnek a parancsok
« Válasz #2 Dátum: 2013. április 05. - 17:24:29 »
0 Show voters
köszi :)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal