Help on GetPlayerPos
#1

pawn Код:
if (strcmp("/plantbomb", cmdtext, true, 10) == 0)
         {
            new Float:X, Float:Y, Float:Z;
            if(pInfo[playerid][pC4] == 1)
             {
                GetPlayerPos(playerid, X, Y, Z);
                pInfo[playerid][pC4posX] = X;
                pInfo[playerid][pC4posY] = Y;
                pInfo[playerid][pC4posZ] = Z;
                return 1;
              }
            return 1;
          }
          if (strcmp("/detonate", cmdtext, true, 10) == 0)
            {
              if(pInfo[playerid][pMission] == 1)
                {
                    CreateExplosion(pInfo[playerid][pC4posX], pInfo[playerid][pC4posY], pInfo[playerid][pC4posZ], 7, 40.0);
                    SendClientMessage(playerid, COLOR_GREEN,"[!]You Receive 100 Score");
                    GameTextForPlayer(playerid,"Mission Passed",5000,0);
                    GetPlayerScore(playerid)+100;
                    return 1;
                 }
                 else
                 {
                   CreateExplosion(pInfo[playerid][pC4posX], pInfo[playerid][pC4posY], pInfo[playerid][pC4posZ], 7, 40.0);
                   SendClientMessage(playerid, COLOR_GREEN,"[!]The Bomb has been Detonated");
                   return 1;
                  }
              }
ERROR:
Код:
C:\DOCUME~1\ADMINI~1\MYDOCU~1\SAMP03~1\GAMEMO~1\LOL.pwn(209) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\MYDOCU~1\SAMP03~1\GAMEMO~1\LOL.pwn(210) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\MYDOCU~1\SAMP03~1\GAMEMO~1\LOL.pwn(211) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\MYDOCU~1\SAMP03~1\GAMEMO~1\LOL.pwn(223) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
Objective: Trying to make a bomb system
Reply
#2

Show the lines in your script that gets the errors
Reply
#3

Dude, cant you see the whole code as errors, mostly the pinfo = Float:X stuff
Reply
#4

Dude it are warnings, not errors. It should work just fine
Reply
#5

Change
pawn Код:
pInfo[playerid][pC4posX] = X;
pInfo[playerid][pC4posY] = Y;
pInfo[playerid][pC4posZ] = Z;
To
pawn Код:
X = pInfo[playerid][pC4posX];
Y = pInfo[playerid][pC4posY];
Z = pInfo[playerid][pC4posZ];
NVM just saw how you made It xD
IGNORE.
Reply
#6

Quote:
Originally Posted by Criss_Angel
Посмотреть сообщение
Dude, cant you see the whole code as errors, mostly the pinfo = Float:X stuff
Mike pwned me
Reply
#7

Thank you, and how would i make adding score
pawn Код:
GetPlayerScore(playerid)+100;
Reply
#8

Quote:
Originally Posted by Criss_Angel
Посмотреть сообщение
Thank you, and how would i make adding score
pawn Код:
GetPlayerScore(playerid)+100;
pawn Код:
SetPlayerScore(playerid, GetPlayerScore(playerid)+100);
Reply
#9

GetPlayerScore(playerid, SetPlayerScore(playerid)+100);

I would rather do it like that, lol.
Reply
#10

Quote:
Originally Posted by playbox12
Посмотреть сообщение
Dude it are warnings, not errors. It should work just fine
Dude it shouldn't.

Lol @ above post, ''cums''.

What kind of variable is pC4PosX/Y/Z? I'm guessing you made them normal integers instead of float values.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)