if (strcmp(\"/kotozes\", cmdtext, true, 10) == 0){ new params[128];params = strtok(cmdtext, idx);if(!strlen(params))returnSendClientMessage(playerid, 0x15005EAA, \"Használat: /kotozes [id]\");new givenid = strval(params);if(IsPlayerConnected(givenid)) TogglePlayerControllable ( playerid, false );GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"%s Meg lett kötözve egy rendor által.\", giveplayer,giveplayerid); SendClientMessageToAll(0x15005EAA, string); } else {SendClientMessage(playerid,0x15005EAA,\"Nincs a szerveren akit kötözni akartál.\");return 1;}
forward Float:GetDistanceBetweenPlayers(p1,p2);public Float:GetDistanceBetweenPlayers(p1,p2){new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){return -1.00;}GetPlayerPos(p1,x1,y1,z1);GetPlayerPos(p2,x2,y2,z2);return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));}
if (strcmp(\"/kotozes\", cmdtext, true, 10) == 0){ new params[128];params = strtok(cmdtext, idx);if(!strlen(params))returnSendClientMessage(playerid, 0x15005EAA, \"Használat: /kotozes [id]\");new givenid = strval(params);if(IsPlayerConnected(givenid)) if (GetDistanceBetweenPlayers(playerid,givenid) > 6) return SendClientMessage(playerid, 0x15005EAA, \"A játékos túl messze van!\");TogglePlayerControllable ( playerid, false );GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"%s Meg lett kötözve egy rendor által.\", giveplayer,giveplayerid); SendClientMessageToAll(0x15005EAA, string); } else {SendClientMessage(playerid,0x15005EAA,\"Nincs a szerveren akit kötözni akartál.\");return 1;}
// This is a comment// uncomment the line below if you want to write a filterscript//#define FILTERSCRIPTforward Float:GetDistanceBetweenPlayers(p1,p2);public Float:GetDistanceBetweenPlayers(p1,p2){new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){return -1.00;}GetPlayerPos(p1,x1,y1,z1);GetPlayerPos(p2,x2,y2,z2);return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));}#include <a_samp>#if defined FILTERSCRIPTpublic OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" Blank Filterscript by your name here\");print(\"--------------------------------------\\n\");return 1;}public OnFilterScriptExit(){return 1;}#elsemain(){print(\"\\n----------------------------------\");print(\" Blank Gamemode by your name here\");print(\"----------------------------------\\n\");}#endifpublic OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/kotozes\", cmdtext, true, 10) == 0){ new params[128];params = strtok(cmdtext, idx);if(!strlen(params))returnSendClientMessage(playerid, 0x15005EAA, \"Használat: /kotozes [id]\");new givenid = strval(params);if(IsPlayerConnected(givenid))if (GetDistanceBetweenPlayers(playerid,givenid) > 6) return SendClientMessage(playerid, 0x15005EAA, \"A játékos túl messze van!\");TogglePlayerControllable ( playerid, false );GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"%s Meg lett kötözve egy rendor által.\", giveplayer,giveplayerid); SendClientMessageToAll(0x15005EAA, string); } else {SendClientMessage(playerid,0x15005EAA,\"Nincs a szerveren akit kötözni akartál.\");return 1;}
C:\\Documents and Settings\\User\\Asztal\\rendor.pwn(9) : error 017: undefined symbol \"IsPlayerConnected\"C:\\Documents and Settings\\User\\Asztal\\rendor.pwn(9) : warning 215: expression has no effectC:\\Documents and Settings\\User\\Asztal\\rendor.pwn(9) : error 001: expected token: \";\", but found \")\"C:\\Documents and Settings\\User\\Asztal\\rendor.pwn(9) : error 029: invalid expression, assumed zeroC:\\Documents and Settings\\User\\Asztal\\rendor.pwn(9) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors.
#include <a_samp>
#if defined FILTERSCRIPTpublic OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" Blank Filterscript by your name here\");print(\"--------------------------------------\\n\");return 1;}public OnFilterScriptExit(){return 1;}#elsemain(){print(\"\\n----------------------------------\");print(\" Blank Gamemode by your name here\");print(\"----------------------------------\\n\");}#endif[/quote]erre a részre gondolok minek main? ez szkript -.- minek else enidif meg if defined? tök fölösleges \
A main() szükséges, hozzátartozik a PWN fájl felépítéséhez.