[AJUDA] JetPack -
Allanrokeiro - 11.03.2011
Galera,tenho um sistema de JetPack aqui,e eu queria que quando o jogador sair do jetpack,ele destruisse automaticamente,e tambem que fosse sу para Administrador Rcon... Vlw
pawn Код:
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" JetckPack Feito por [BS]Lukas");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/jetpack", true) == 0) {
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(370,3,X,Y,Z);
SendClientMessage(playerid,0x80FF00AA,"| INFO | Vocк criou um JetPack.");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
return 0;
}
public OnPlayerInfoChange(playerid)
{
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 OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
Obrigado
Re: [AJUDA] JetPack -
JonathanFeitosa - 11.03.2011
pawn Код:
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" JetckPack Feito por [BS]Lukas");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/jetpack", true) == 0) {
if(IsPlayerAdmin(playerid)){
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Vocк Nгo Pode Usar /jetpack em Um Veiculo !");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(370,3,X,Y,Z);
SendClientMessage(playerid,0x80FF00AA,"| INFO | Vocк criou um JetPack.");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
}
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
Tenta Criado Por : Lucas =)
tenta ver c pegaw c der erro falae. isso nao ele so some ele n destroe so aparece quem usa ela
Re: [AJUDA] JetPack -
DartakousLien - 11.03.2011
pawn Код:
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" JetckPack Feito por [BS]Lukas");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/jetpack", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(370,3,X,Y,Z);
SendClientMessage(playerid,0x80FF00AA,"| INFO | Vocк criou um JetPack.");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
}
return 0;
}
public OnPlayerInfoChange(playerid)
{
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 OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
}
}
return 1;
}
Nao testei...mas acho que da...se nao der...fala
Re: [AJUDA] JetPack -
JonathanFeitosa - 11.03.2011
DJLoko o seu vai aparecer pra outros players pegar unica coisa que bloquear vai ser o /jetpack. mais se o adm apertar F larga ele ^^
Re: [AJUDA] JetPack -
DartakousLien - 11.03.2011
Nao Jonathan
eu peguei no comando do Allanrokeiro e coloquei so para admin rcon (como ele pediu) e depois ele pediu tabem para quando sair do jetpack destruir. Quando vc aperta enter o jetpack sai e fica no chao, certo? Entao eu fiz para quando ele aperta f para sair, seta o
Код:
SetPlayerSpecialAction
para 0, ou seja nenhum, e assim tira logo o jetpack sem tar a colocar no chao e outros players poderem pegar ...
Re: [AJUDA] JetPack -
JonathanFeitosa - 11.03.2011
aah nao vi o resto malz so viu o comando kk
Re: [AJUDA] JetPack -
DartakousLien - 11.03.2011
Quote:
Originally Posted by Jonathan_Feitosa
aah nao vi o resto malz so viu o comando kk
|
Nao tem mal...espero que isto funcione
Re: [AJUDA] JetPack -
Jorge_Hard - 11.03.2011
Vo usar tambem