Na újra egy script, ebben a scriptben pár gyors cmd van
Tartalmazza:
- Élet
- Páncél
- Kill
- Nrg lerakás
[pawn]
/*
*********************************
** gyors parancsok by: checcovt**
*********************************
*/
#include <a_samp>
#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 by: checcovt\");
print(\"-----------bekapcsolva-------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"\\n--------------------------------------\");
print(\" Gyors parancsok by: checcovt\");
print(\"-----------kikapcsolva-------------\\n\");
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/kill\", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Öngyilkos lettél!\");
return 1;
}
if (strcmp(\"/heal\", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Életerõd feltöltve!\");
return 1;
}
if (strcmp(\"/arm\", cmdtext, true, 10) == 0)
{
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Páncélzatod feltöltve!\");
return 1;
}
if (strcmp(\"/nrg\", cmdtext, true, 10) == 0)
{
nrg(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Nrg-500 lerakva!\");
return 1;
}
return 0; // return SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Itt nincs ilyen parancs!\"); és akkor ha nem létezõ parancsot ír, kiírja neki...
}
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]