30.07.2013, 18:45
I have been searching for a strcmp /s and /l cmd and didnt find any.
can you guys help me? :/
can you guys help me? :/
#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;
}
pawn Код:
|