Sziasztok!
Volt az elõzõ scriptem a gyors cmds most ezt átírtam zcmd be... igazából az lenne a kérdésem h ezt akkor így kell-e csinálni, mivel most használom elõször!
Commenteket várok
[pawn]/*
*****************************************
** gyors parancsok in zcmd by: checcovt**
*****************************************
*/
#include <a_samp>
#include <zcmd>
#define COLOR_LIGHTBLUE 0x1ac4c7AA
#define COLOR_ORANGE 0xFF9933AA
new Vehicle[MAX_PLAYERS],Interior;
forward CarSpawner(playerid,model);
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Gyors parancsok in zcmd by: checcovt\");
print(\"-----------bekapcsolva-------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"\\n--------------------------------------\");
print(\" Gyors parancsok in zcmd by: checcovt\");
print(\"-----------kikapcsolva-------------\\n\");
return 1;
}
#endif
CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Öngyilkos lettél!\");
return 1;
}
CMD:heal(playerid, params[])
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Életerõd feltöltve!\");
return 1;
}
CMD:arm(playerid, params[])
{
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Páncélzatod feltöltve!\");
return 1;
}
CMD:nrg(playerid, params[])
{
nrg(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Nrg-500 lerakva!\");
return 1;
}
public CarSpawner(playerid,model){
new Float:X,Float:Y,Float:Z,VehicleID;
if(IsPlayerInAnyVehicle(playerid)){
VehicleID=GetPlayerVehicleID(playerid);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(VehicleID);
GetPlayerPos(playerid,X,Y,Z);
Interior=GetPlayerInterior(playerid);
RemovePlayerFromVehicle(playerid);
Vehicle[playerid]=AddStaticVehicleEx(model,X+3, Y, Z, 900.00, -1, -1, -1);
LinkVehicleToInterior(Vehicle[playerid],Interior);
PutPlayerInVehicle(playerid,Vehicle[playerid],0);
SendClientMessage(playerid,COLOR_ORANGE,\"Jármûved kicserélve.\");
}else{
GetPlayerPos(playerid,X,Y,Z);
Interior=GetPlayerInterior(playerid);
Vehicle[playerid]=AddStaticVehicleEx(model,X+3, Y, Z, 900.00, -1, -1, -1);
LinkVehicleToInterior(Vehicle[playerid],Interior);
PutPlayerInVehicle(playerid,Vehicle[playerid],0);
}
return 1;
}
nrg(playerid){
CarSpawner(playerid,522);
}[/pawn]