Jump to content
  • 0

pomoc Vlastní Povolání


DarcoWTF

Dotaz

Zdravím, chtěl jsem si udělat vlastní povolání jenom mi to píše chyby, přidávám řádky

 

#include

new povolanie[MAX_PLAYERS];

new uspickup;

// 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(" U.S AIR FORCE (POVOLÁNÍ) > BY DARCO");

print("--------------------------------------\n");

return 1;

}

 

public OnFilterScriptExit()

{

return 1;

}

 

#else

 

main()

{

print("\n----------------------------------");

print(" U.S AIR FORCE (POVOLÁNÍ) > BY DARCO");

print("----------------------------------\n");

}

 

#endif

 

public OnGameModeInit()

{

uspickup = CreatePickup(1239,1,205.9575,-229.6653,1.7786);

// 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)

{

povolanie[playerid] = 0;

 

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("/U.S Air Force", cmdtext, true) == 0) {

if(IsPlayerInSphere(playerid,205.9575,-229.6653,1.7786,5) == 1) {

GetPlayerName(playerid, pname, MAX_PLAYER_NAME);

format(string, sizeof(string), " %s SE STAL CLENEM U.S AIR FORCE!", pname);

SendClientMessageToAll(COLOR_RED, string);

printf(string);

povolanie[playerid] = 1;

SetSpawnInfo(playerid,1,71,203.9847,-236.9536,1.6733,178.2899,0,0,0,0,0,0);

SetPlayerInterior(playerid,0);

SpawnPlayer(playerid);

}

return 1;

}

 

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 == uspickup)

{

GameTextForPlayer(playerid,"~r~Ak sa chces stat U.S Air Force členem napis ~g~/U.S Air Force",3000,5);

}

return 1;

}

 

public OnPlayerSelectedMenuRow(playerid, row)

{

return 1;

}

 

public OnPlayerExitedMenu(playerid)

{

return 1;

}

IsPlayerInSphere(playerid,Float:x,Float:y,Float:z,radius)

{

if(GetPlayerDistanceToPointEx(playerid,x,y,z) < radius){

return 1;

}

return 0;

}

GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z)

{

new Float:x1,Float:y1,Float:z1;

new Float:tmpdis;

GetPlayerPos(playerid,x1,y1,z1);

return floatround(tmpdis);

}

 

Link to comment
Share on other sites

11 odpovědí na tuto otázku

Recommended Posts

  • 0

C:\Users\Pavel\Desktop\Povolání.pwn(38) : warning 217: loose indentation

C:\Users\Pavel\Desktop\Povolání.pwn(65) : warning 217: loose indentation

C:\Users\Pavel\Desktop\Povolání.pwn(107) : error 017: undefined symbol "pname"

C:\Users\Pavel\Desktop\Povolání.pwn(108) : error 017: undefined symbol "string"

C:\Users\Pavel\Desktop\Povolání.pwn(108) : error 017: undefined symbol "string"

C:\Users\Pavel\Desktop\Povolání.pwn(108) : error 029: invalid expression, assumed zero

C:\Users\Pavel\Desktop\Povolání.pwn(108) : fatal error 107: too many error messages on one line

 

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

5 Errors.

Link to comment
Share on other sites

  • 0
C:\Users\Pavel\Desktop\Povolání.pwn(38) : warning 217: loose indentation

C:\Users\Pavel\Desktop\Povolání.pwn(65) : warning 217: loose indentation

 

omg hore nekam, treba pod #include : #pragma tabsize 0

Link to comment
Share on other sites

  • 0

loose identation - nahoru napis #pragma tabsize 0

undefined symbol pname - new pname[MAX_PLAYER_NAME];

undefined symbol string - new string[128];

a v OnPlayerCommandText na konci ty returny dej takle

}

return 1;

}

return 0;

}

Link to comment
Share on other sites

  • 0

C:\Users\Pavel\Desktop\Povolání.pwn(29) : error 001: expected token: ";", but found "-identifier-"

C:\Users\Pavel\Desktop\Povolání.pwn(114) : error 017: undefined symbol "COLOR_RED"

C:\Users\Pavel\Desktop\Povolání.pwn(206) : warning 203: symbol is never used: "z"

C:\Users\Pavel\Desktop\Povolání.pwn(206) : warning 203: symbol is never used: "y"

C:\Users\Pavel\Desktop\Povolání.pwn(206) : warning 203: symbol is never used: "x"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

2 Errors.

Link to comment
Share on other sites

  • 0
C:\Users\Pavel\Desktop\Povolání.pwn(29) : error 001: expected token: ";", but found "-identifier-"

C:\Users\Pavel\Desktop\Povolání.pwn(114) : error 017: undefined symbol "COLOR_RED"

C:\Users\Pavel\Desktop\Povolání.pwn(206) : warning 203: symbol is never used: "z"

C:\Users\Pavel\Desktop\Povolání.pwn(206) : warning 203: symbol is never used: "y"

C:\Users\Pavel\Desktop\Povolání.pwn(206) : warning 203: symbol is never used: "x"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

2 Errors.

undefined symbol "COLOR_RED" - nahoru #define COLOR_RED 0xFF0000FF

a tohle dej misto toho tveho

GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z)

{

new Float:x1,Float:y1,Float:z1;

new Float:tmpdis;

GetPlayerPos(playerid,x1,y1,z1);

tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2)+floatpower(floatabs(floatsub(z,z1)),2));

return floatround(tmpdis);

}

Link to comment
Share on other sites

  • 0

a ještě to první

C:\Users\Pavel\Desktop\Povolání.pwn(29) : error 001: expected token: ";", but found "-identifier-"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

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

Ten TuT ze kterého jsem to dělal byl na nic.

Link to comment
Share on other sites

  • 0
C:\Users\Pavel\Desktop\Povolání.pwn(38) : warning 217: loose indentation

C:\Users\Pavel\Desktop\Povolání.pwn(65) : warning 217: loose indentation

 

omg hore nekam, treba pod #include : #pragma tabsize 0

 

A nebo nebuď hovado a Tabuj :d

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...