about my teleport's code
#1

if (strcmp("/teleport", cmdtext, true, 10) == 0)
{
SetPlayerInterior(playerid,11);
SetPlayerPos(playerid, 508.7362, -87.4335, 998.9609);
return true;
}

////////////////////////////////////////////////////////////////////////////////////////////



if (strcmp("/teleportgrua", cmdtext, true, 10) == 0)
{
SetPlayerInterior(playerid,11);
SetPlayerPos(playerid, 2399.2263,1926.4996,76.3745);
return true;
}

ok now what is the problem with my script for teleporting ?
first code that with "/teleport" works...ok but why the other code with that "/teleportgrua" doesn't work ?
please i need help here ...i don't know what is the problem is the problem with the interiorid or what please i need a good code to work can anybody help me please?
Reply
#2

Код:
if (strcmp("/teleportgrua", cmdtext, true, 13) == 0)
{
   SetPlayerInterior(playerid,11);
   SetPlayerPos(playerid, 2399.2263,1926.4996,76.3745);
   return true;
}
Reply
#3

you change onlythat true to 13? what means that ...
Reply
#4

pawn Код:
if (strcmp("/teleportgrua", cmdtext, true, 13) == 0)
if 'true' is set, then strcmp will check if the letters are also capital or not. Basiclly, It's not kinda useful
And '13' is the lenght of the strings. They need to be the same lenght for strcmp to succesed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)