Need help
#1

I have been searching for a strcmp /s and /l cmd and didnt find any.
can you guys help me? :/
Reply
#2

/s and /l cmd? So you mean /shout and /low for RP Servers?
Reply
#3

Quote:
Originally Posted by Facerafter
Посмотреть сообщение
/s and /l cmd? So you mean /shout and /low for RP Servers?
No, /s = save position /l = load position
Reply
#4

pawn Код:
#include <a_samp>

new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS];
new ActivePos[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
ActivePos[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
ActivePos[playerid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/s", true) == 0)
    {
         GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
         SendClientMessage(playerid, -1, "Your pos saved.");
         ActivePos[playerid] = 1;
         return 1;
    }
    if(strcmp(cmdtext, "/l", true) == 0)
    {
    if(ActivePos[playerid] == 1)
    {
    SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
    SendClientMessage(playerid, -1, "Your pos loadet.");
    ActivePos[playerid] = 0;
    return 1;
    }
    }
    return 1;
    }
Reply
#5

Quote:
Originally Posted by ScRipTeRi
Посмотреть сообщение
pawn Код:
#include <a_samp>

new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS];
new ActivePos[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
ActivePos[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
ActivePos[playerid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/s", true) == 0)
    {
         GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
         SendClientMessage(playerid, -1, "Your pos saved.");
         ActivePos[playerid] = 1;
         return 1;
    }
    if(strcmp(cmdtext, "/l", true) == 0)
    {
    if(ActivePos[playerid] == 1)
    {
    SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
    SendClientMessage(playerid, -1, "Your pos loadet.");
    ActivePos[playerid] = 0;
    return 1;
    }
    }
    return 1;
    }
Thank you so much bro!
+REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)