Posts: 2,938
Threads: 162
Joined: May 2010
i want this like
Код:
if(strcmp(cmdtext, "/robbank", true) == 0) // If they type /robbank
{
if(IsPlayerInCheckpoint(playerid)) // Check if they are in a checkpoint <====tag mismatch it's corrected
{
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
new cash = random(60000); // random number between 1 & 60000 is the money they will get
GivePlayerMoney(playerid, cash); // Give the player the money!
format(string,sizeof(string),"%s has just stolen %d from the bank!",playername,cash);
SendClientMessageToAll(TEAL,string);
}
return 1;
}
not if there in a checkpoint i want it to be in a specific checkpoint
Posts: 545
Threads: 4
Joined: Dec 2006
Reputation:
0
can i see your onplayerentercp code
Posts: 2,938
Threads: 162
Joined: May 2010
public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
return 1;
}
Код:
public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
return 1;
}
Posts: 545
Threads: 4
Joined: Dec 2006
Reputation:
0
where do you add your cps? AddDynamicCheckpoint or somethinbg by the looks
Posts: 2,938
Threads: 162
Joined: May 2010
under ongamemodeint
CreateDynamicCp()
[edit] did u get my message?
[EDIT]i checked everything nothings missing a bracket<.<
TheInnocentOne
Unregistered
That goes anywhere in your script but NOT in a callback or function.
pawn Код:
bankrobcp = CreateDynamicCP(...);
Fill in the ... with what you have now, and replace the old line with that one.
Now, if you want to check if someone is in the checkpoint:
pawn Код:
if(IsPlayerInDynamicCP(playerid, bankrobcp))
{
//code here
}
Posts: 2,938
Threads: 162
Joined: May 2010
thx but now this prob>.<
Код:
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(239) : error 001: expected token: ";", but found "-identifier-"
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(495) : error 004: function "OnPlayerUpdate" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(590) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(596) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(600) : error 004: function "Encrypt" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(601) : error 004: function "OnPlayerLogin" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(603) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(607) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(612) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(617) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(620) : error 004: function "Encrypt" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(628) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(642) : error 004: function "OnPlayerLogin" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(643) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(651) : error 004: function "ShowStats" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(658) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(666) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(670) : error 004: function "IsStringAName" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(672) : error 004: function "GetPlayerID" is not implemented
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(694) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(701) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(709) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(748) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(760) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(769) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(778) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(787) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSNR~1.PWN(796) : error 079: inconsistent return types (array & non-array)
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
TheInnocentOne
Unregistered
You've missed a closing bracket ( } ) somewhere in your script.
Posts: 2,938
Threads: 162
Joined: May 2010
TheInnocentOne
Unregistered
The missig bracket will most likely be near the line of your first error. Goto the line the first error is on and look around there.