30.12.2011, 09:59
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 ?
public OnPlayerDisconnect(playerid, reason)
{
new x, y, z;
GetPlayerPos(playerid, x, y, z);
return 1;
}
Use this
pawn Код:
|
public OnPlayerDisconnect(playerid, reason)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
return 1;
}
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);
}
GivePlayerWeapon(playerid,100,1);
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 Код:
|