10.04.2010, 11:31
Fully fixed code:
(A slight note: watch out for opening and closing curly brackets '{' & '}' !)
(A slight note: watch out for opening and closing curly brackets '{' & '}' !)
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(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
new mypickup[5];
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
mypickup[0] = CreatePickup(1210, 2, 1905.55, 1297.35, 55.37);
mypickup[1] = CreatePickup(1559, 2, 2325.27, -1148.86, 1050.71);
mypickup[2] = CreatePickup(1318, 2, 1497.36, -688.37, 94.75);
mypickup[3] = CreatePickup(1239, 2, -1663.49, 1215.47, 7.25);
mypickup[4] = CreatePickup(1274, 2, -1652.83, 1211.75, 7.25);
SetGameModeText("(JRPGS)");
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)
{
SetPlayerMapIcon(playerid, 12, 1491.5153, -687.1533, 94.7500, 31, 0);
GivePlayerMoney(playerid, 40000);
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, "/R87DE41129", true))
{
SendClientMessage(playerid, 0xAA3333AA, "-.-.-.-.-R87D41129-.-.-.-.-");
SendClientMessage(playerid, 0xAA3333AA, "WARNING: You have unlocked");
SendClientMessage(playerid, 0xAA3333AA, "All the icons to find the secret Pickups");
SendClientMessage(playerid, 0xAA3333AA, "Don't tell anyone else about this");
SendClientMessage(playerid, 0xAA3333AA, "This is a secret code that unlocks all");
SendClientMessage(playerid, 0xAA3333AA, "Sercret Pickups Ammo weapons and Money");
SendClientMessage(playerid, 0xAA3333AA, "The icons are red flags");
SendClientMessage(playerid, 0xAA3333AA,"----------------------------------------");
SetPlayerMapIcon(playerid, 12, 1904.5548, 1297.1615, 55.3731, 52, 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)
{
if(pickupid == mypickup[0])
{
SendClientMessage(playerid, 0x10F441AA, "You Have found $30000"); // Message the player
GivePlayerMoney(playerid, 30000); // Give the player the money
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
}
else if(pickupid == mypickup[1])
{
SetPlayerPos(playerid, 1497.9353, -690.8831, 94.7500);
SetPlayerInterior(playerid, 0);
}
else if(pickupid == mypickup[2])
{
SetPlayerPos(playerid, 2325.3816, -1143.8422, 1050.4922);
SetPlayerInterior(playerid, 12);
}
else if(pickupid == mypickup[3])
{
SendClientMessage(playerid,0x10F441AA,"><><><>CarShop Help><><><><>><><><><><><><>");
SendClientMessage(playerid,0x10F441AA,"Welcome to the car shop. You can");
SendClientMessage(playerid,0x10F441AA,"Buy a car by seeing a list of cars at");
SendClientMessage(playerid,0x10F441AA,"The money icon sign. These cars");
SendClientMessage(playerid,0x10F441AA,"Are some you might of not never seen before");
SendClientMessage(playerid,0x10F441AA,"Enjoy and get urself a nice ride bye.");
SendClientMessage(playerid,0x10F441AA,"CarShop Menu By Jay & Ryder");
SendClientMessage(playerid,0x10F441AA,"><><><><><><><><><><><><><>><><><><><><><>><><");
}
else if(pickupid == mypickup[4])
{
SendClientMessage(playerid,0x10F441AA,"test");
}
return 1;
}