quit and save position
#1

im using /qs which saves your position when you quit, after it saved Im using Kick(playerid), that only does "server closed the conection" is the a way of accually disconnecting from samp like when you use /q ?
Reply
#2

no 2char.
Reply
#3

Use this
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
       new x, y, z;
       GetPlayerPos(playerid, x, y, z);
       return 1;
}
Reply
#4

Quote:
Originally Posted by Spooky
Посмотреть сообщение
Use this
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
       new x, y, z;
       GetPlayerPos(playerid, x, y, z);
       return 1;
}
looks like someone didn't read the topic.
First of all you have to use the Float: tag on the variables and second he asked about a function which does like /q.

There is no function like /q but you can try to crash the client.
Reply
#5

Oops Sorry

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
       new Float:x, Float:y, Float:z;
       GetPlayerPos(playerid, x, y, z);
       return 1;
}
Reply
#6

No I better not crash anything, its fine they'll have to use /qs and /q after

one more thing when they do that im using a bubble, so people around know that they just left (this is in case you chase someone they go round the corner and leave, so you dont run around looking for them like an idiot as you will see a bubble text saying their name and what they used "/q" or "/qs")

pawn Код:
if (strcmp("/qs", cmdtext, true, 10) == 0)
    {
        PlayerInfo[playerid][pQS] = 1;
        PlayerInfo[playerid][pIntQS] = GetPlayerInterior(playerid);

        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        PlayerInfo[playerid][pPos_xQS] = x;
        PlayerInfo[playerid][pPos_yQS] = y;
        PlayerInfo[playerid][pPos_zQS] = z;

        new plname2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname2, sizeof(plname2));
        new string3[256];
        format(string3, sizeof(string3), "%s:\n(( /qs ))",plname2);
        SetPlayerChatBubble(playerid, string3, COLOR_WHITE, 15.0, 12000);
        Kick(playerid);
    }

    if (strcmp("/q", cmdtext, true, 10) == 0)
    {
        new plname2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname2, sizeof(plname2));
        new string3[256];
        format(string3, sizeof(string3), "%s:\n(( /q ))",plname2);
        SetPlayerChatBubble(playerid, string3, COLOR_WHITE, 15.0, 12000);
    }
The problem is that the bubble doesnt appear, I just want the bubble to appear and stay there for 12s and then disapear.

Or insted of using commandtext, should I use onplayerdisconnect, and then the disconnect reason?
Reply
#7

I dunno if Kye fix it but in the old days client will crash if you try to " give " a weapon to someone with an invalid ID for example weapon ID 100 don't exist... so if you do

pawn Код:
GivePlayerWeapon(playerid,100,1);
it used to crash the client but now i'm not using it anymore because i don't need it.
Reply
#8

Quote:
Originally Posted by silvan
Посмотреть сообщение
I dunno if Kye fix it but in the old days client will crash if you try to " give " a weapon to someone with an invalid ID for example weapon ID 100 don't exist... so if you do

pawn Код:
GivePlayerWeapon(playerid,100,1);
it used to crash the client but now i'm not using it anymore because i don't need it.
Tried it already for a test in my script with invalid wep id.It gives you the normal message "Invalid weapon ID".

You can't emulate /q command because is included in sa-mp client.You can try to create multi explosions at same time so it will crash. (if u want crash),if not,you can't do anything.
Reply
#9

Yes thx, never mind the /q command, I want to know how to display that bubble, because it goes when you leave.
Reply
#10

Quote:
Originally Posted by HondaCBR
Посмотреть сообщение
Yes thx, never mind the /q command, I want to know how to display that bubble, because it goes when you leave.
Explain better please,what "bubble" u want show?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)