SA-MP Forums Archive
what the wrong here? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: what the wrong here? (/showthread.php?tid=625214)



what the wrong here? - Thanks - 29.12.2016

What the wrong here?

PHP код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
   if(
CP_DEADPoint)
   {
     if(
ROBBING_DEAD[playerid] == 1)
     {
         new 
string[64], pName[MAX_PLAYER_NAME];
         
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
         
SendClientMessage(playeridCOLOR_ORANGE"[ROBBING]: Go to hell DEAD");
         
SendClientMessage(playeridCOLOR_ORANGE"[DEAD PLEASE]");
         
ROBBING_DEAD[playerid] =0;
         new 
mrand =random(150000);
         
format(string,sizeof(string),"[DEAD]: {FF9A00}%s(%d) has BEEN DEAD FROM CARS XD]",pName,playerid,mrand);
         
SendClientMessageToAll(COLOR_RED,string);
         
GivePlayerMoney(playeridmrand);
     }
   }
    return 
1;




Re: what the wrong here? - Private200 - 29.12.2016

PHP код:
format(string,sizeof(string),"[DEAD]: {FF9A00}%s(%d) has BEEN DEAD FROM CARS XD]",pName,playerid,mrand); 
That's what wrong. mrand should be removed.


Re: what the wrong here? - Thanks - 29.12.2016

Quote:
Originally Posted by Private200
Посмотреть сообщение
PHP код:
format(string,sizeof(string),"[DEAD]: {FF9A00}%s(%d) has BEEN DEAD FROM CARS XD]",pName,playerid,mrand); 
That's what wrong. mrand should be removed.
Hi, im removing the mrand still Problem, but 100% i thing From here...

Код:
if(CP_DEADPoint)
Because i thing its not a vaild code....


Re: what the wrong here? - RedRex - 29.12.2016

Hi, In my idea You cannot use the OnplayerEnterRaceCheckpoint For robbing or complete robbing something... So You must use a

EXAMPLE:
Something Like this And OnPleyerEnterCheckpoint And add Your Code i thing its will be Done without any errors.
Код:
Example = CreateDynamicCP(1284.6355,-60.6730,1002.4991, 3.0, -1, -1, -1, 100.0);



Re: what the wrong here? - Private200 - 30.12.2016

The problem I told you about will not show any warning while compiling, but it will definitely not be the same in-game. What are you trying to do and what is wrong with compiling? We cannot figure out the problem with just having part of a code.