echo Executing Server Config... lanmode 0 rcon_password rconpass (or sth like this) maxplayers 50 port 7777 hostname SA-MP 0.3 Server gamemode0 grandlarc (or sth like this) filterscripts (sth here) announce 1 query 1 weburl www.sa-mp.com maxnpc 0 onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000
echo Executing Server Config... lanmode 0 rcon_password yourpass maxplayers 50 port 7777 hostname SA-MP 0.3 Server gamemode0 filterscripts announce 1 query 1 weburl www.sa-mp.com maxnpc 0 onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000
gamemode0 tutscript
Originally Posted by Wikipedia
Pawn, formerly known as Small, is an open source programming language primarily intended as an embeddable scripting language. It is maintained by a Dutch company named CompuPhase, which released the first version in 1998.
|
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#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 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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
//<----- 1-Lined Comment
//<----- 1-Lined Comment
But this is not
error 010: invalid function or declaration
/* This is a comment */
/***********************************
* TUTORIAL SCRIPT *
* CREATED BY: CHRISTIAN *
* MODIFIED BY: MATTHEW STRIKER *
************************************/
/*
Deskoft Studios Tutorial Script
Developer: Christian
This script is created to teach users
the programming language used in
sa-mp, "pawn". This script can be
copied, used, modified or whatever
they want, i don't care. i only want
you to leave the credits as they are.
CREDITS:
Christian (Teaching & Developing the Script)
Matthew Striker (Continuing the tutorial)
*/
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
Originally Posted by wordnetweb.princeton.edu
give a definition for the meaning of a word
|
#define DEVELOPER "Christian"
#define VERSION "v.0.0.1a"
printf("Version: %s", VERSION);
Version: v.0.0.1a
v.0.0.1a Christian
print("Tutorial Script");
printf("Version: %s", VERSION);
printf("Developer: %s", DEVELOPER);
Tutorial Script Version: 0.0.1a Developer: Christian
Originally Posted by Wikipedia
a variable is a facility for storing data
|
new number=1;
new number2=1;
new result;
result=number+number2;
You: Hello Anne Anne: Hi there You: I have just learned math Anne: Cool! You: Do you know what 1+1 is? |
Anne: 2 ofcourse! You: Nice Job! |
new integrer;
new myname[128];
new Score[MAX_PLAYERS];
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
Deskoft Studios Tutorial Script
Developer: Christian
This script is created to teach users
the programming language used in
sa-mp, "pawn". This script can be
copied, used, modified or whatever
they want, i don't care. i only want
you to leave the credits as they are.
*/
#include <a_samp>
#define DEVELOPER "Christian"
#define VERSION "v.0.0.1a"
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
new Score[MAX_PLAYERS];
#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("Tutorial Script");
printf("Version: %s", VERSION);
printf("Developer: %s", DEVELOPER);
}
#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 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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
Originally Posted by Wikipedia
A timer is a specialized type of clock. A timer can be used to control the sequence of an event or process. Whereas a stopwatch counts upwards from zero for measuring elapsed time, a timer counts down from a specified time interval, like an hourglass
|
public SetScore()
{
return 1;
}
myfunc()
{
return 1;
}
for(new i=0;i<5;i++)
{
}
for(new i=0;i<MAX_PLAYERS;i++)
{
Score[i]=GetPlayerMoney(i);
SetPlayerScore(i, Score[i]);
}
SetPlayerScore(playerid, 5);
new playermoney;
playermoney=GetPlayerMoney(playerid);
public function lacks forward declaration (symbol "SetScore")
forward SetScore();
Developer: Christian
This script is created to teach users
the programming language used in
sa-mp, "pawn". This script can be
copied, used, modified or whatever
they want, i don't care. i only want
you to leave the credits as they are.
*/
#include <a_samp>
#define DEVELOPER "Christian"
#define VERSION "v.0.0.1a"
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
new Score[MAX_PLAYERS];
forward SetScore();
#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("Tutorial Script");
printf("Version: %s", VERSION);
printf("Developer: %s", DEVELOPER);
}
#endif
public SetScore()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
Score[i]=GetPlayerMoney(i);
SetPlayerScore(i, Score[i]);
}
return 1;
}
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 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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
#include <dini>
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
return 1;
}
format(file, sizeof(file), "Users/%s.ini", pname);
#define COLOR_GREY 0xAFAFAFAA
if(dini_Exists(file))
{
}else{
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(dini_Exists(file))
{
}else{
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(dini_Exists(file))
{
// means the file exists!
}else{
dini_Create(file);
}
return 1;
}
/*
Developer: Christian
This script is created to teach users
the programming language used in
sa-mp, "pawn". This script can be
copied, used, modified or whatever
they want, i don't care. i only want
you to leave the credits as they are.
*/
#include <a_samp>
#include <dini>
#define DEVELOPER "Christian"
#define VERSION "v.0.0.1a"
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
new Score[MAX_PLAYERS];
forward SetScore();
#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("Tutorial Script");
printf("Version: %s", VERSION);
printf("Developer: %s", DEVELOPER);
}
#endif
public SetScore()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
Score[i]=GetPlayerMoney(i);
SetPlayerScore(i, Score[i]);
}
return 1;
}
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 OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(dini_Exists(file))
{
// means the file exists!
}else{
dini_Create(file);
}
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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
return 1;
}
if(dini_Exists(file))
if(!dini_Exists(file))
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(!dini_Exists(file))
{
dini_Create(file);
OnPlayerRegister(playerid, 1);
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(!dini_Exists(file))
{
dini_Create(file);
OnPlayerRegister(playerid, 1);
}
if(dini_Int(pfile, "Registered") == 0)
{
OnPlayerRegister(playerid, 1);
}
return 1;
}
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
return 1;
}
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
if(step == 1)
{
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(!dini_Exists(file))
{
dini_Create(file);
OnPlayerRegister(playerid, 1);
}
if(dini_Int(pfile, "Registered") == 0)
{
OnPlayerRegister(playerid, 1);
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(!dini_Exists(file))
{
dini_Create(file);
OnPlayerRegister(playerid, 1);
}
if(dini_Int(file, "Registered") == 0)
{
OnPlayerRegister(playerid, 1);
}
return 1;
}
echo Executing Server Config... lanmode 0 rcon_password idontknowhowtoscriptpleasehelpme maxplayers 500 port 7777 hostname [0.3] My Test Server gamemode0 tutscript filterscripts announce 0 query 1 weburl www.sa-mp.com onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000 maxnpc 0 plugins sscanf
echo Executing Server Config... lanmode 0 rcon_password idontknowhowtoscriptpleasehelpme maxplayers 500 port 7777 hostname [0.3] My Test Server gamemode0 tutscript filterscripts announce 0 query 1 weburl www.sa-mp.com onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000 maxnpc 0 plugins sscanf.so
#include <a_samp>
#include <dini>
#include <zcmd>
#include <sscanf2>
/*
Developer: Christian
This script is created to teach users
the programming language used in
sa-mp, "pawn". This script can be
copied, used, modified or whatever
they want, i don't care. i only want
you to leave the credits as they are.
*/
#include <a_samp>
#include <dini>
#include <zcmd>
#include <sscanf2>
#define DEVELOPER "Christian"
#define VERSION "v.0.0.1a"
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
new Score[MAX_PLAYERS];
forward SetScore();
#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("Tutorial Script");
printf("Version: %s", VERSION);
printf("Developer: %s", DEVELOPER);
}
#endif
public SetScore()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
Score[i]=GetPlayerMoney(i);
SetPlayerScore(i, Score[i]);
}
return 1;
}
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;
}
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
if(step == 1)
{
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(!dini_Exists(file))
{
dini_Create(file);
OnPlayerRegister(playerid, 1);
}
if(dini_Int(file, "Registered") == 0)
{
OnPlayerRegister(playerid, 1);
}
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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
CMD:somethinghere(playerid, params[])
{
}
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
return 1;
}
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
}
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
}else{
}
return 1;
}
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SEAGREEN 0x2E8B57AA
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_DARKRED 0xC60000FF
#define COLOR_YELLOW 0xFFFF00AA
#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_SYSTEM 0xa9c4e4
#define COLOR_SANTORANGE 0xFF6C3BAA
#define COLOR_INVIS 0xAFAFAF00
#define COLOR_CRIMBLUE 0x3A47DEFF
#define COLOR_WANTED 0xCC0066AA
#define COLOR_GROVE 0x378729FF
#define COLOR_BALLAS 0xA31D88FF
#define COLOR_DARKGREY 0x696969FF
#define COLOR_ERPSS 0x549852FF
#define COLOR_L1A 0x50A2ABFF
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define BLACK 0x000000FF
/*
Developer: Christian
This script is created to teach users
the programming language used in
sa-mp, "pawn". This script can be
copied, used, modified or whatever
they want, i don't care. i only want
you to leave the credits as they are.
*/
#include <a_samp>
#include <dini>
#include <zcmd>
#include <sscanf2>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SEAGREEN 0x2E8B57AA
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_DARKRED 0xC60000FF
#define COLOR_YELLOW 0xFFFF00AA
#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_SYSTEM 0xa9c4e4
#define COLOR_SANTORANGE 0xFF6C3BAA
#define COLOR_INVIS 0xAFAFAF00
#define COLOR_CRIMBLUE 0x3A47DEFF
#define COLOR_WANTED 0xCC0066AA
#define COLOR_GROVE 0x378729FF
#define COLOR_BALLAS 0xA31D88FF
#define COLOR_DARKGREY 0x696969FF
#define COLOR_ERPSS 0x549852FF
#define COLOR_L1A 0x50A2ABFF
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define BLACK 0x000000FF
#define DEVELOPER "Christian"
#define VERSION "v.0.0.1a"
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
new Score[MAX_PLAYERS];
forward SetScore();
#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("Tutorial Script");
printf("Version: %s", VERSION);
printf("Developer: %s", DEVELOPER);
}
#endif
public SetScore()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
Score[i]=GetPlayerMoney(i);
SetPlayerScore(i, Score[i]);
}
return 1;
}
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;
}
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
if(step == 1)
{
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(!dini_Exists(file))
{
dini_Create(file);
OnPlayerRegister(playerid, 1);
}
if(dini_Int(file, "Registered") == 0)
{
OnPlayerRegister(playerid, 1);
}
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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
}else{
}
return 1;
}
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
}else{
SendClientMessage(playerid, COLOR_GREY, "ERROR: This command requires: /v [vehicleid][color1][color2]");
}
return 1;
}
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
new vin;
new Float:x, Float:y, Float:z;
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
new vin;
new Float:x, Float:y, Float:z;
}else{
SendClientMessage(playerid, COLOR_GREY, "ERROR: This command requires: /v [vehicleid][color1][color2]");
}
return 1;
}
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
new vin;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
}else{
SendClientMessage(playerid, COLOR_GREY, "ERROR: This command requires: /v [vehicleid][color1][color2]");
}
return 1;
}
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
new vin;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(vehicleid, x, y, z, 0.0, color1, color2, -1);
}else{
SendClientMessage(playerid, COLOR_GREY, "ERROR: This command requires: /v [vehicleid][color1][color2]");
}
return 1;
}
vin=CreateVehicle(vehicleid, x, y, z, 0.0, color1, color2, -1);
PutPlayerInVehicle(playerid, vin, 0);
/*
Developer: Christian
This script is created to teach users
the programming language used in
sa-mp, "pawn". This script can be
copied, used, modified or whatever
they want, i don't care. i only want
you to leave the credits as they are.
*/
#include <a_samp>
#include <dini>
#include <zcmd>
#include <sscanf2>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SEAGREEN 0x2E8B57AA
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_DARKRED 0xC60000FF
#define COLOR_YELLOW 0xFFFF00AA
#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_SYSTEM 0xa9c4e4
#define COLOR_SANTORANGE 0xFF6C3BAA
#define COLOR_INVIS 0xAFAFAF00
#define COLOR_CRIMBLUE 0x3A47DEFF
#define COLOR_WANTED 0xCC0066AA
#define COLOR_GROVE 0x378729FF
#define COLOR_BALLAS 0xA31D88FF
#define COLOR_DARKGREY 0x696969FF
#define COLOR_ERPSS 0x549852FF
#define COLOR_L1A 0x50A2ABFF
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define BLACK 0x000000FF
#define DEVELOPER "Christian"
#define VERSION "v.0.0.1a"
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
new Score[MAX_PLAYERS];
forward SetScore();
#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("Tutorial Script");
printf("Version: %s", VERSION);
printf("Developer: %s", DEVELOPER);
}
#endif
public SetScore()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
Score[i]=GetPlayerMoney(i);
SetPlayerScore(i, Score[i]);
}
return 1;
}
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;
}
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
if(step == 1)
{
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
new file[128];
format(file, sizeof(file), "Users/%s.ini", pname);
if(!dini_Exists(file))
{
dini_Create(file);
OnPlayerRegister(playerid, 1);
}
if(dini_Int(file, "Registered") == 0)
{
OnPlayerRegister(playerid, 1);
}
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("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
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;
}
COMMAND:v(playerid, params[])
{
// my first command, i'm so horny!
new vehicleid, color1, color2;
if(!sscanf(params, "iii", vehicleid, color1, color2))
{
new vin;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
vin=CreateVehicle(vehicleid, x, y, z, 0.0, color1, color2, -1);
PutPlayerInVehicle(playerid, vin, 0);
}else{
SendClientMessage(playerid, COLOR_GREY, "ERROR: This command requires: /v [vehicleid][color1][color2]");
}
return 1;
}
AddStaticVehicle(487,1758.8578,-1871.2877,30.0641,95.6751,0,0); // Here we will put the player AddStaticVehicle(487,1781.1493,-1833.0995,33.3569,11.3549,0,0); // camera AddPlayerClass(0,1781.0450,-1808.2030,13.5312,11.4841,0,0,0,0,0,0); // look at
AddStaticVehicle(487,1758.8578,-1871.2877,30.0641,95.6751,0,0); // Here we will put the player AddStaticVehicle(487,1781.1493,-1833.0995,33.3569,11.3549,0,0); // camera AddPlayerClass(0,1781.0450,-1808.2030,13.5312,11.4841,0,0,0,0,0,0); // look at |
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
if(step == 1)
{
SetPlayerPos(playerid, 1758.8578,-1871.2877,30.0641); // Hidden Player
SetPlayerCameraPos(playerid, 1781.1493,-1833.0995,33.3569); // Camera Pos
SetPlayerCameraLookAt(playerid, 1781.0450,-1808.2030,13.5312); // Camera Look At
}
return 1;
}
forward OnPlayerRegister(playerid, step);
public OnPlayerRegister(playerid, step)
{
if(step == 1)
{
SetPlayerPos(playerid, 1758.8578,-1871.2877,30.0641); // Hidden Player
SetPlayerCameraPos(playerid, 1781.1493,-1833.0995,33.3569); // Camera Pos
SetPlayerCameraLookAt(playerid, 1781.0450,-1808.2030,13.5312); // Camera Look At
SendClientMessage(playerid, COLOR_WHITE, "==============================================================================");
SendClientMessage(playerid, COLOR_WHITE, "Deskoft's Freeroam/Roleplay Script");
SendClientMessage(playerid, COLOR_GREY, "Welcome to Deskoft's Freeroam/Roleplay Script! We are proud to have you here.");
SendClientMessage(playerid, COLOR_GREY, "This is the tutorial, in which you will create your account.");
SendClientMessage(playerid, COLOR_GREY, "Please wait while we load and save the required files.");
SendClientMessage(playerid, COLOR_WHITE, "==============================================================================");
}
return 1;
}