03.04.2011, 19:36
https://sampwiki.blast.hk/wiki/GameTextForPlayer
What line is params?
Example command for 'id' error.
Get an idea from this. /Get Cmd.
And alex how time zcmd?
I mean how u want?
Thanks.
What line is params?
Example command for 'id' error.
pawn Код:
COMMAND:get(playerid, params[])
{
new id;
if(IsPlayerConnected(id))
{
if(IsPlayerAdmin(playerid))
{
if(!sscanf(params, "ui", id))
{
new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerInterior(id,GetPlayerInterior(playerid));
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "Adminstrator %s has teleported you to himself/herself.", name);
SendClientMessage(id, 0xffff00aa, string);
format(string, sizeof(string), "Player %s has been teleported to you.", PlayerName);
SendClientMessage(playerid, 0xffff00AA, string);
SetPlayerVirtualWorld(id,GetPlayerVirtualWorld(playerid));
SetPlayerPos(id,x+2,y,z);
return 1;
}
else return SendClientMessage(playerid, 0xffff00aa, "Usage:- /Get (PlayerID/PartOfName).");
}
else return SendClientMessage(playerid, 0xffff00aa, "You are not an Adminstrator.");
}
else return SendClientMessage(playerid, 0xffff00aa, "Player is not connected or The ID is incorrect.");
}
pawn Код:
public OnPlayerConnect(playerid)
{
new string[50];
format(string, sizeof(string), "~b~Welcome to Cod SA-MP");
GameTextForPlayer(playerid, string, 3000, 4);
return 1;
}
I mean how u want?
Thanks.