SA-MP Forums Archive
Whats wrong? - 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: Whats wrong? (/showthread.php?tid=439483)



Whats wrong? - Tuntun - 25.05.2013

I made a cmd:

CMD:bank(playerid,params[])
{
SetPlayerPos(playerid,1494.325195,1304.942871,1093 .289062);
return 1;
}



It's work and no pawno error but when i type it from the server why its fail?i mean i fall from the sky..but i copyd the interior id from a WIKI..



Note: i'm not owner of this gamemode ut i using it.


Re: Whats wrong? - DobbysGamertag - 25.05.2013

What's the bank name?


Re: Whats wrong? - Hernando - 25.05.2013

You didn't set there interior. and btw, that isn't the bank interior, it is the bike school's interior.
pawn Код:
CMD:bank(playerid,params[])
{
    SetPlayerPos(playerid,1494.325195,1304.942871,1093.289062);
    SetPlayerInterior(playerid, 3);
    return 1;
}



Re: Whats wrong? - DobbysGamertag - 25.05.2013

pawn Код:
CMD:bank(playerid,params[])
{
SetPlayerPos(playerid,1494.325195,1304.942871,1093.289062);
SetPlayerInterior(playerid,3);
return 1;
}



Re: Whats wrong? - Tuntun - 25.05.2013

Thanks all... but there is a way to add check point in a place and after we go on the place we will teleported to a interior?please make it for me...just for help..


Re: Whats wrong? - DobbysGamertag - 25.05.2013

Try:
pawn Код:
OnPlayerConnect(playerid)
{
SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size) //the x y z of the bank exterior
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{

    //set the players position to the bank
    //set the players interior to the bank
    return 1;
}
//to make sure it works:
public OnPlayerLeaveCheckpoint(playerid)
{
    printf("Player %i left a checkpoint!",playerid);
    return 1;
}



Re: Whats wrong? - Mattakil - 25.05.2013

What do you mean? Like what would a check point do?


Re: Whats wrong? - DobbysGamertag - 25.05.2013

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
What do you mean? Like what would a check point do?
He enters the checkpoint, it sets him to the interior. Like a house icon? I look at it like a fancy teleport


Re: Whats wrong? - Tuntun - 25.05.2013

Mattakill like : a red check point in front of a shop and after we go to the shop will be teleported to interior : id...

and i got a error...:

Код:
D:\Drivers\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(28765) : error 021: symbol already defined: "RL_OnPlayerConnect"
D:\Drivers\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(28766) : warning 202: number of arguments does not match definition
D:\Drivers\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(28767) : error 001: expected token: ";", but found "return"
D:\Drivers\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(28770) : error 021: symbol already defined: "Streamer_OnPlayerEnterCP"
D:\Drivers\High Speed Drivers\gamemodes\HighSpeedDrivers.pwn(28778) : error 021: symbol already defined: "Streamer_OnPlayerLeaveCP"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
And i used:

Код:
OnPlayerConnect(playerid)
{
SetPlayerCheckpoint(playerid, -1772.1531,18.7958,182.4964) //the x y z of the bank exterior
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{

    SetPlayerPos(playerid,1494.325195,1304.942871,1093.289062);
    SetPlayerInterior(playerid,3);
    return 1;
}
//to make sure it works:
public OnPlayerLeaveCheckpoint(playerid)
{
    printf("Player %i left a checkpoint!",playerid);
    return 1;
}
But should i use OnPlayerConnect(playerid) on top od the script right?then why i take it to last?


Re: Whats wrong? - DobbysGamertag - 25.05.2013

You can add the AddCheckPoint line at any point really. Are you using a streamer by any chance? look for

pawn Код:
#include streamer
or something along them lines

Edit: LOL i got negative repped for posting the reply at the same time as someone

Quote:

Don't post already posted help.

How rude.