PDA

View Full Version : I'm starting making a DM script but i need help with PAWNO


Stefand
13/11/2011, 11:38 AM
Hi Scripters, Users

I have to much questions about scripting so i started to make my own DM script,
to learn.

But in tutorials i see that you have in pawno http://www.upload.ee/image/1807866/screen.png
that.

But i dont have it and my pawno gives an error when i start it.

Failed to set data for " < that kind of error.

My 2 questions,

1) How do i get those thing into my pawno on that screen and

2) How do i fix my error?

Mr_Scripter
13/11/2011, 11:40 AM
2nd question : Run Pawno as Administrator

=WoR=G4M3Ov3r
13/11/2011, 11:43 AM
To do this, you simply need to open the pawno folder, open settings, change FileAssoc=1 to FileAssoc=0

Doing this will solve both of your problems.

Nenad
13/11/2011, 11:45 AM
Hi Scripters, Users

I have to much questions about scripting so i started to make my own DM script,
to learn.

But in tutorials i see that you have in pawno http://www.upload.ee/image/1807866/screen.png
that.

But i dont have it and my pawno gives an error when i start it.

Failed to set data for " < that kind of error.

My 2 questions,

1) How do i get those thing into my pawno on that screen and

2) How do i fix my error?


1) Open pawno and go to "Options" and click "Show Function List"
2) Right click on "Pawno.exe" and then "Run As Administrator"

Stefand
13/11/2011, 11:47 AM
Thanks all :) it worked :)

Stefand
13/11/2011, 11:58 AM
I have scripted this:




#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

//colours
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF



public OnGameModeInit()
{
//Misc
SetGameModeText("DM/Stunt/Freeroam");
//Classes
AddPlayerClass(299,1956.9802,1343.0463,15.3746,263 .8791,25,100,0,0,0,0); // Guyspawn
AddPlayerClass(299,2097.0010,1160.5452,11.6484,62. 7001,28,300,0,0,0,0); // guyspawn2
//Cars
AddStaticVehicle(402,2036.8307,1332.8802,10.5746,1 80.9736,30,30); // Car
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
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 OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotolvpd", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,2289.3369,2423.2573,10.8203) ;
SendClientMessage(playerid, COLOR_YELLOW , "You Just Teleported To the LVPD");
return 1;
}
return 0;
}

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;
}

But if i put it online my server wont connect and he is started

Stefand
13/11/2011, 12:00 PM
nvm i had to change the Changeme password xD fail me