06.07.2015, 15:25
(
Последний раз редактировалось Sime30; 07.07.2015 в 00:48.
)
Edit: Thanks SickAttack, Kaliber and Jefff for solving this problem. I have chosen the best solution to my problem. Use it if you need it.
Hi guys!
Haven't use samp servers for a while now and wanted to update my gamemode a bit.
The thing is, my commands stopped working(not all of them).
Things I remember I have done:
- Updated ZCMD to I-ZCMD
- Updated to PlayerPoolSize and VehiclePoolSize , new functions in 0.3.7
I reverted to ZCMD and some of the for(new... loops back to basic ones.
When I type this command, it returns me -Command not recognized-
For example, my command /makebiz works perfectly, while /givemoney will give me money, but will send me a message "Command not recognized".
Yeah, I really don't know what I have done hahaha. Maybe ZCMD, SSCANF2?
Quote:
Problem was in <= MAX_PLAYER_NAME should be < MAX_PLAYER_NAME but here you go better
pawn Код:
|
Hi guys!
Haven't use samp servers for a while now and wanted to update my gamemode a bit.
The thing is, my commands stopped working(not all of them).
Things I remember I have done:
- Updated ZCMD to I-ZCMD
- Updated to PlayerPoolSize and VehiclePoolSize , new functions in 0.3.7
I reverted to ZCMD and some of the for(new... loops back to basic ones.
When I type this command, it returns me -Command not recognized-
pawn Код:
CMD:b(playerid, params[])
{
new string[128];
if(isnull(params)) return SCM(playerid,LIGHTBLUE,"Use: {FFFFFF}/b [text]");
format(string, sizeof(string), "%s: (( %s ))",InGameChatRemoveUnderscore(playerid),params);
ProxDetector(25.0, playerid, string, COLOR_WHITE);
return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, LIGHTBLUE, "Las Vegas: Origins -{FFFFFF} Command not recognized, use {33CCFF}/help" );
return 1;
}
forward ProxDetector(Float:radi, playerid, string[],color);
public ProxDetector(Float:radi, playerid, string[],color)
{
if(PlayerInfo[playerid][Logged] == false) return 1;
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(Player,i)
{
if(IsPlayerInRangeOfPoint(i,radi,x,y,z) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && PlayerInfo[i][Logged] == true)
{
SendClientMessage(i,color,string);
}
}
return 1;
}
Yeah, I really don't know what I have done hahaha. Maybe ZCMD, SSCANF2?
pawn Код:
CMD:givemoney(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] < HEAD_ADMIN) return SendClientMessage(playerid, COLOR_NICERED, "Denied!");
new id,money;
if(sscanf(params, "ui",id,money)) return SendClientMessage(playerid, LIGHTBLUE, "Use:{FFFFFF} /givemoney [ID Player] [Money]");
if(PlayerInfo[id][Logged] == false) return SCM(playerid, COLOR_ERROR,"That player is Offline!");
if(id == INVALID_PLAYER_ID)return SCM(playerid,COLOR_ERROR,"Wrong ID!");
GiveHimMoney(id, money);
new str[100];
format(str,sizeof(str),"You gave{FFFFFF} %s {00C0FF}$%d",InGameChatRemoveUnderscore(id), money);
SendClientMessage(playerid,LIGHTBLUE,str);
format(str,sizeof(str),"Admin {FFFFFF} %s gave you {00C0FF}$%d ",InGameChatRemoveUnderscore(playerid),money);
SendClientMessage(id,LIGHTBLUE,str);
return 1;
}