Help gate - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help gate (
/showthread.php?tid=104959)
Help gate -
tiwk - 27.10.2009
Код:
#include <a_samp>
#include <core>
#include <float>
new igate; //
//------------------------------------------------------------------------------
main()
{
print("\n~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=");
print(" .: Test :.\n");
print(" .: Test :.");
print("~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=\n");
}
//------------------------------------------------------------------------------
public OnGameModeInit()
{
AddPlayerClass(287,2793.918,-2456.878,13.63217, 90, 4, 500, 24, 250, 31, 250);
igate = CreateObject(980,2233.875732,-2214.911865,13.546875,0.000000,0.000000,315.433532); // mafia gate 1
return 1;
}
//------------------------------------------------------------------------------
public OnGameModeExit()
{
print("\n~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=");
print(" .: Test :.\n");
print(" .: Test :.\n");
print(" .: Test :.\n");
print("~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=\n");
}
//------------------------------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp(cmdtext, "/opengate2", true) == 0) {
{
MoveObject(igate,2720.827,-2514.226,13.46094,3.0);
GivePlayerMoney(playerid, -1000);
GameTextForPlayer(playerid,"Opening gate now, please wait...",4000,3); }
return 1;
}
return 0;
}
I wanted to create a gate but does not work
C:\Users\Nando\Desktop\GWa.pwn(49) : warning 217: loose indentation
C:\Users\Nando\Desktop\GWa.pwn(51) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\Nando\Desktop\GWa.pwn(51) : error 010: invalid function or declaration
Re: Help gate -
Peter_Corneile - 27.10.2009
pawn Код:
#include <a_samp>
#include <core>
#include <float>
new igate; //
//------------------------------------------------------------------------------
main()
{
print("\n~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=");
print(" .: Test :.\n");
print(" .: Test :.");
print("~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=\n");
}
//------------------------------------------------------------------------------
public OnGameModeInit()
{
AddPlayerClass(287,2793.918,-2456.878,13.63217, 90, 4, 500, 24, 250, 31, 250);
igate = CreateObject(980,2233.875732,-2214.911865,13.546875,0.000000,0.000000,315.433532); // mafia gate 1
return 1;
}
//------------------------------------------------------------------------------
public OnGameModeExit()
{
print("\n~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=");
print(" .: Test :.\n");
print(" .: Test :.\n");
print(" .: Test :.\n");
print("~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=\n");
}
//------------------------------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/opengate2", true) == 0) {
{
MoveObject(igate,2720.827,-2514.226,13.46094,3.0);
GivePlayerMoney(playerid, -1000);
GameTextForPlayer(playerid,"Opening gate now, please wait...",4000,3); }
return 1;
}
return 0;
}