All pastes #513736 Raw Edit

Fix please

public text v1 · immutable
#513736 ·published 2007-05-27 12:00 UTC
rendered paste body
#include <a_samp>

static gTeam[MAX_PLAYERS];

#define TEAM_COP 1

#define BLUE 0x0000FFAA

#define WHITE 0xFFFFFFAA

main()
{
	print("\n------------------------------------------");
	print(" Gamemode Copslife V1.0 by ****** & ******* ");
	print("------------------------------------------\n");
}



public OnGameModeInit()
{
	print("GameModeInit()");
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	printf("OnPlayerRequestClass(%d, %d)", 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 OnGameModeExit()
{
	print("GameModeExit()");
	return 1;
}

public OnPlayerConnect(playerid)
{
	printf("OnPlayerConnect(%d)", playerid);
	return 1;
}

public OnPlayerDisconnect(playerid)
{
	printf("OnPlayerDisconnect(%d)", playerid);
	return 1;
}

public OnPlayerSpawn(playerid)
{
	printf("OnPlayerSpawn(%d)", playerid);
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	printf("OnPlayerDeath(%d, %d, %d)", playerid, killerid, reason);
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	printf("OnVehicleSpawn(%d)", vehicleid);
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	printf("OnVehicleDeath(%d, %d)", vehicleid, killerid);
	return 1;
}

public OnPlayerText(playerid)
{
	printf("OnPlayerText(%d)", playerid);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmd, "/*****", true) ==0)
{
   SetPlayerPos(playerid, 2296.0146,2468.5847,10.8203);
   SendClientMessage(playerid, BLUE, "You are now logged in as Officier of the Law");
   gTeam[playerid] = TEAM_COP
   SetPlayerColor(playerid, 0x0000FFAA);
return 1;
}

if(strcmp(cmd, "/lshq", true) ==0)
{
		 if(gTeam[playerid] == TEAM_COP)
		 {
         SetPlayerPos(playerid, 1552.4500,-1674.9900,16.1953);
         SendClientMessage(playerid, BLUE, "you have been teleported to the LSPD");
         }
         else
         {
         SendClientMessage(playerid, WHITE, "You are not an Official cop!");
         }
return
}
if(strcmp(cmd, "/sfhq", true) ==0)
{
		 if(gTeam[playerid] == TEAM_COP)
		 {
         SetPlayerPos(playerid, -1622.0497,692.1870,7.1875);
         SendClientMessage(playerid, BLUE, "you have been teleported to the SFPD");
         }
         else
         {
         SendClientMessage(playerid, WHITE, "You are not an Official cop!");
         }
return
}

if(strcmp(cmd, "/lvhq", true) ==0)
{
		 if(gTeam[playerid] == TEAM_COP)
		 {
         SetPlayerPos(playerid, 2296.0146,2468.5847,10.8203);
         SendClientMessage(playerid, BLUE, "you have been teleported to the LVPD");
         }
         else
         {
         SendClientMessage(playerid, WHITE, "You are not an Official cop!");
         }
return
}

if(strcmp(cmd, "/lsheli", true) ==0)
{
		 if(gTeam[playerid] == TEAM_COP)
		 {
         SetPlayerPos(playerid, 1545.3167,-1645.1847,28.4021);
         SendClientMessage(playerid, BLUE, "you have been teleported to the heli Depot");
         }
         else
         {
         SendClientMessage(playerid, WHITE, "You are not an Official cop!");
         }
return
}

if(strcmp(cmd, "/sfheli", true) ==0)
{
		 if(gTeam[playerid] == TEAM_COP)
		 {
         SetPlayerPos(playerid, -1689.5441,696.2824,30.6016);
         SendClientMessage(playerid, BLUE, "you have been teleported to the heli Depot");
         }
         else
         {
         SendClientMessage(playerid, WHITE, "You are not an Official cop!");
         }
return
}

if(strcmp(cmd, "/lvheli", true) ==0)
{
		 if(gTeam[playerid] == TEAM_COP)
		 {
         SetPlayerPos(playerid, 2282.5361,2446.6587,46.9775);
         SendClientMessage(playerid, BLUE, "you have been teleported to the heli Depot");
         }
         else
         {
         SendClientMessage(playerid, WHITE, "You are not an Official cop!");
         }
return
}
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	printf("OnPlayerInfoChange(%d)");
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	printf("OnPlayerEnterVehicle(%d, %d, %d)", playerid, vehicleid, ispassenger);
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	printf("OnPlayerExitVehicle(%d, %d)", playerid, vehicleid);
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	printf("OnPlayerStateChange(%d, %d, %d)", playerid, newstate, oldstate);
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	printf("OnPlayerEnterCheckpoint(%d)", playerid);
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	printf("OnPlayerLeaveCheckpoint(%d)", playerid);
	return 1;
}

//===SAPD Cars===//
AddStaticVehicle(596,1600.5654,-1683.7241,5.6104,89.8766,0,2); //
AddStaticVehicle(596,1601.8469,-1695.6897,5.6113,90.6571,0,2); //
AddStaticVehicle(596,1601.2716,-1704.3131,5.6107,272.2435,0,2); //
AddStaticVehicle(596,1595.3854,-1709.6793,5.6107,358.9088,0,2); //
AddStaticVehicle(596,1583.5521,-1711.0065,5.6116,178.8773,0,2); //
AddStaticVehicle(596,1571.1875,-1710.9819,5.6103,359.9946,0,2); //
AddStaticVehicle(596,1545.9071,-1672.2991,5.6112,269.2072,0,2); //
AddStaticVehicle(523,1526.3553,-1643.0188,5.4609,212.9279,0,2); //
AddStaticVehicle(523,1529.7184,-1642.5435,5.4609,216.0460,0,2); //
AddStaticVehicle(523,1534.2853,-1642.3640,5.4608,222.7779,0,2); //
AddStaticVehicle(523,1538.0061,-1642.5347,5.4608,214.7938,0,2); //
AddStaticVehicle(597,-1592.3353,749.3904,-5.4735,3.8452,0,2); //
AddStaticVehicle(597,-1584.2090,748.2734,-5.4741,177.3967,0,2); //
AddStaticVehicle(597,-1572.5948,742.8961,-5.4748,270.1569,0,2); //
AddStaticVehicle(597,-1573.8267,730.7656,-5.4741,271.3997,0,2); //
AddStaticVehicle(597,-1574.0524,710.9580,-5.4731,88.6526,0,2); //
AddStaticVehicle(598,2252.0579,2443.1021,10.5699,359.9961,0,2); //
AddStaticVehicle(598,2260.5872,2442.6030,10.5646,179.6313,0,2); //
AddStaticVehicle(598,2269.8447,2442.7878,10.5660,359.9665,0,2); //
AddStaticVehicle(598,2281.7761,2442.7122,10.5638,185.2592,0,2); //
AddStaticVehicle(598,2273.5903,2476.0962,10.5666,177.2092,0,2); //
AddStaticVehicle(598,2256.5117,2477.6201,10.5652,2.7081,0,2); //
AddStaticVehicle(497,1565.4749,-1650.7920,28.5782,84.8533,0,2); //
AddStaticVehicle(497,-1680.1838,705.6899,30.7779,88.8270,0,2); //
AddStaticVehicle(497,2270.7297,2446.6411,47.1527,177.1520,0,2); //
AddStaticVehicle(497,2290.1934,2444.0601,47.1556,182.7788,0,2); //

dcmd_register(playerid,params[]) {

    // The command shouldn't work if we already are authed
    if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"You are already authed!");

    // The command shouldn't work if an account with this
    // nick already exists
    if (udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"The account already exists, please use /login [password]");

    // Did he forgot the password?
    if (strlen(params)==0) return SystemMsg(playerid,"Correct usage: /register [password]");

    // We save the money to the accstate
    if (udb_Create(PlayerName(playerid),params)) return SystemMsg(playerid,"Account created. Please login with /login [password]");
   		GivePlayerMoney(playerid,5000);
    return true;

 }
   dcmd_login(playerid,params[]) {

    // The command shouldn't work if we already are authed
    if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"You are already logged in!");

    // The command shouldn't work if an account with this
    // nick does not exists
    if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Sorry but that account doesn't exist, please use '/register [password]'");

    // Did he forgot the password?
    if (strlen(params)==0) return SystemMsg(playerid,"Correct usage: /login [password]");

    if (udb_CheckLogin(PlayerName(playerid),params)) {
       // Login was correct

       // Following thing is the same like the missing SetPlayerCommand
       GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")-GetPlayerMoney(playerid));

       PLAYERLIST_authed[playerid]=true;

       return SystemMsg(playerid,"You are now logged in!");
    } else {
       // Login was incorrect
       return SystemMsg(playerid,"Invalid Password!");
    }
    return true;
 }


--------------------------------------------

Errors:

F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(87) : error 017: undefined symbol "cmd"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(92) : error 001: expected token: ";", but found "-identifier-"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(96) : error 017: undefined symbol "cmd"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(108) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(109) : error 001: expected token: ";", but found "if"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(109) : error 017: undefined symbol "cmd"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(121) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(123) : error 001: expected token: ";", but found "if"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(123) : error 017: undefined symbol "cmd"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(135) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(137) : error 001: expected token: ";", but found "if"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(137) : error 017: undefined symbol "cmd"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(149) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(151) : error 001: expected token: ";", but found "if"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(151) : error 017: undefined symbol "cmd"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(163) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(165) : error 001: expected token: ";", but found "if"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(165) : error 017: undefined symbol "cmd"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(177) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(178) : error 001: expected token: ";", but found "return"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(181) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(181) : error 017: undefined symbol "OnPlayerInfoChange"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(187) : warning 225: unreachable code
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(187) : error 029: invalid expression, assumed zero
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(187) : error 017: undefined symbol "OnPlayerEnterVehicle"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(189) : error 017: undefined symbol "vehicleid"
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(193) : warning 225: unreachable code
F:\DOCUME~1\img_sa\SAMPSE~1\pawno\COPSLI~1.PWN(193) : error 029: invalid expression, assumed zero

Compilation aborted.Pawn compiler 3.0.3367			Copyright (c) 1997-2005, ITB CompuPhase


26 Errors.