08.05.2010, 10:31
Quote:
Originally Posted by TMasters.ProRP
The code:
pawn Код:
pawn Код:
pawn Код:
![]() didnt test it but thats the thing, minor error reports could be fixed if you know how to script, i didnt write it carefully |
I want to make a command /aistrike like that ^
|
but it doesn't work, i get one error of it
and some warnings but i know how to remove those warnings
error:
Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\gamemodes\test.pwn(60) : warning 217: loose indentation C:\Documents and Settings\Luc\Bureaublad\Pawno\gamemodes\test.pwn(236) : warning 217: loose indentation C:\Documents and Settings\Luc\Bureaublad\Pawno\gamemodes\test.pwn(412) : warning 217: loose indentation C:\Documents and Settings\Luc\Bureaublad\Pawno\gamemodes\test.pwn(413) : warning 217: loose indentation C:\Documents and Settings\Luc\Bureaublad\Pawno\gamemodes\test.pwn(490) : warning 217: loose indentation C:\Documents and Settings\Luc\Bureaublad\Pawno\gamemodes\test.pwn(657) : error 025: function heading differs from prototype Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
666: }
657: public strike(playerid,cX,cY,cZ)
script:
on top:
Код:
#include <a_samp> forward strike(playerid,Float:cX,Float:cY,Float:cZ); #define KEY_ACTION (1) #define KEY_CROUCH (2) #define KEY_FIRE (4) #define KEY_SPRINT (8) #define KEY_SECONDARY_ATTACK (16) #define KEY_JUMP (32) #define KEY_LOOK_RIGHT (64) #define KEY_HANDBRAKE (128) #define KEY_LOOK_LEFT (256) #define KEY_SUBMISSION (512) #define KEY_LOOK_BEHIND (512) #define KEY_WALK (1024) #define KEY_ANALOG_UP (2048) #define KEY_ANALOG_DOWN (4096) #define KEY_ANALOG_RIGHT (16384) #define KEY_ANALOG_LEFT (8192) #define CS-DM 2003 new DMZone[MAX_PLAYERS];
Код:
if (strcmp(cmdtext, "/airstrike", true)==0) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); SetTimerEx("strike", 7000, false, "ifff", playerid,X,Y,Z); SendClientMessage(playerid, 0xFFFFFFAA, "Airstrike on your position in 7 seconds!"); return 1; }
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } public strike(playerid,cX,cY,cZ)//THIS IS WRONG LINE SRRY { CreateExplosion(cX, cY, cZ, 7, 100); CreateExplosion(cX+5, cY, cZ, 7, 100); CreateExplosion(cX, cY+5, cZ, 7, 100); CreateExplosion(cX-5, cY, cZ, 7, 100); CreateExplosion(cX, cY-5, cZ, 7, 100); CreateExplosion(cX+10, cY, cZ, 7, 100); CreateExplosion(cX, cY+10, cZ, 7, 100); } //THIS IS THE LAST LINE
Ty Alot
-luckie12