i am a beginner at scripting and...
#1

so i am a beginner at scripting and i have no idea what to actually do. i would like a tutorial on scripting and what the scripts mean (i have never scripted before). i would also like to know what should i do with this file. i have this script that i followed a tutorial to make and put it on the 'new' document in pawno. i get this error though and i would like you to repost the script but fixed. here it is (ps: the script near the end is the shop script https://sampforum.blast.hk/showthread.php?tid=313095)

#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

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
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 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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
#include <zcmd>
COMMAND:MJHotDog(playerid, params[])
{
if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, MJCOLOR, "You do not have enough money to buy my hotdog special");
givePlayerMoney(playerid, -10);
SendClientMessage(playerid, MJCOLOR, "Thank you for buying my very delicious MJ Hotdog");
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.0,0,0,0,0,0,0); //Eating Animation
return 1;
}






please tell me what i have done wrong with this script. also, tell me what to save it as please
Reply


Messages In This Thread
i am a beginner at scripting and... - by bensmart469 - 14.04.2012, 19:23
Re: i am a beginner at scripting and... - by Hoss - 14.04.2012, 19:25
Re: i am a beginner at scripting and... - by Kitten - 14.04.2012, 19:27
Re: i am a beginner at scripting and... - by bensmart469 - 14.04.2012, 20:18
Re: i am a beginner at scripting and... - by Kitten - 14.04.2012, 20:25
Re: i am a beginner at scripting and... - by bensmart469 - 14.04.2012, 20:39
Re: i am a beginner at scripting and... - by Kitten - 14.04.2012, 20:41
Re: i am a beginner at scripting and... - by bensmart469 - 14.04.2012, 21:01
Re: i am a beginner at scripting and... - by bensmart469 - 14.04.2012, 21:04
Re: i am a beginner at scripting and... - by Kitten - 14.04.2012, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)