SA-MP Forums Archive
[Help] Code ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Code ? (/showthread.php?tid=638205)



[Help] Code ? - PhamHoang - 28.07.2017

Code
PHP код:
CMD:50(playeridparams[])
{
    if(
PlayerInfo[playerid][pConnectHours] == 50)
    {
    if(
PlayerInfo[playerid][pConnectHours] < 50) return SendClientMessage(playeridCOLOR_RED"
You are not enough 50 ConnectHours!"
);
    else
        {
            
SendClientMessageEx(playeridCOLOR_YELLOW"Full weapons - $200.000 va 20.000 Mats!");
            
GivePlayerValidWeapon(playerid2760000);
            
GivePlayerValidWeapon(playerid2460000);
            
GivePlayerValidWeapon(playerid3160000);
            
GivePlayerValidWeapon(playerid3460000);
            
GivePlayerValidWeapon(playerid2960000);
            
GivePlayerCash(playerid200000);
            
PlayerInfo[playerid][pMats] += 20000;
            return 
1;
        }
    }
    else 
SendClientMessageEx(playeridCOLOR_RED"You are not enough 50 ConnectHours!");
    return 
1;

Helpppppppp


Re: [Help] Code ? - Eoussama - 28.07.2017

And what is the probelm? Compilation erros?!


Re: [Help] Code ? - CodeStyle175 - 28.07.2017

PHP код:
CMD:50(pid){ 
    if(
PlayerInfo[pid][pConnectHours] < 50) return SendClientMessage(pid,COLOR_RED,"You are not enough 50 ConnectHours!"); 
    
SendClientMessageEx(playeridCOLOR_YELLOW"Full weapons - $200.000 va 20.000 Mats!"); 
    new 
arr[]={27,24,31,34,29};
    for(new 
i,i2=sizeof(arr); i<i2i++)GivePlayerValidWeapon(pid,arr[i],60000);
    
GivePlayerCash(pid200000);
    
PlayerInfo[pid][pMats]+=20000;
    return 
1;




Re: [Help] Code ? - PhamHoang - 28.07.2017

No compiler failed
Failed
Error at full 50 hours of play used command multiple times


Re: [Help] Code ? - PhamHoang - 28.07.2017

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
PHP код:
CMD:50(pid){ 
    if(
PlayerInfo[pid][pConnectHours] < 50) return SendClientMessage(pid,COLOR_RED,"You are not enough 50 ConnectHours!"); 
    
SendClientMessageEx(playeridCOLOR_YELLOW"Full weapons - $200.000 va 20.000 Mats!"); 
    new 
arr[]={27,24,31,34,29};
    for(new 
i,i2=sizeof(arr); i<i2i++)GivePlayerValidWeapon(pid,arr[i],60000);
    
GivePlayerCash(pid200000);
    
PlayerInfo[pid][pMats]+=20000;
    return 
1;

No compiler failed
Failed
Error at full 50 hours of play used command multiple times


Re: [Help] Code ? - Xeon™ - 28.07.2017

PHP код:
CMD:50(pid){ 
    if(
PlayerInfo[pid][pConnectHours] < 50) return SendClientMessage(pid,COLOR_RED,"You are not enough 50 ConnectHours!"); 
    
SendClientMessageEx(pidCOLOR_YELLOW"Full weapons - $200.000 va 20.000 Mats!"); 
    new 
arr[]={27,24,31,34,29};
    for(new 
i,i2=sizeof(arr); i<i2i++)GivePlayerValidWeapon(pid,arr[i],60000);
    
GivePlayerCash(pid200000);
    
PlayerInfo[pid][pMats]+=20000;
    return 
1;




Re: [Help] Code ? - PhamHoang - 28.07.2017

Quote:
Originally Posted by XeonMaster
Посмотреть сообщение
PHP код:
CMD:50(pid){ 
    if(
PlayerInfo[pid][pConnectHours] < 50) return SendClientMessage(pid,COLOR_RED,"You are not enough 50 ConnectHours!"); 
    
SendClientMessageEx(pidCOLOR_YELLOW"Full weapons - $200.000 va 20.000 Mats!"); 
    new 
arr[]={27,24,31,34,29};
    for(new 
i,i2=sizeof(arr); i<i2i++)GivePlayerValidWeapon(pid,arr[i],60000);
    
GivePlayerCash(pid200000);
    
PlayerInfo[pid][pMats]+=20000;
    return 
1;

Read the command up


Re: [Help] Code ? - Xeon™ - 28.07.2017

these aren't same, please re read my post and his post careful


Re: [Help] Code ? - PhamHoang - 28.07.2017

I want to code not enough play time can not use and only use once


Re: [Help] Code ? - PhamHoang - 28.07.2017

Quote:
Originally Posted by XeonMaster
Посмотреть сообщение
these aren't same, please re read my post and his post careful
Okey,
I want to code not enough play time can not use and only use once